Add support for pegging the JVM version when checking code coverage.
[cfb.git] / test / net / jaekl / cfb / analyze / HtmlReportTest.java
index 26f9f8e13f06522d203dbe7b3872a463b556c251..154a29187704a7967106fc13e74d2cb517f52494 100644 (file)
@@ -149,6 +149,9 @@ public class HtmlReportTest {
                                
                // The character set UTF-8 should be specified
                assertTrue(html.contains("<META CHARSET=\"UTF-8\"/>"));         
+               
+               // The footer should be present
+               assertTrue(html.contains("DIV CLASS=\"Footer\">Report generated by <A HREF=\"https://jaekl.net/cfb/\">CFB</A></DIV>"));
        }
        
        @Before
@@ -196,4 +199,23 @@ public class HtmlReportTest {
                assertTrue(pos > 0);
                assertFalse(html.substring(pos + expected.length()).contains(expected));
        }
+       
+       @Test
+       public void testField() throws FileNotFoundException, IOException, SAXException, ParserConfigurationException 
+       {
+               String xml = BugReportData.getPrologue()
+                                  + BugReportData.getVoVolatileIncrement()
+                                  + BugReportData.getEpilogue();
+
+               String html = createReport(null, xml);
+               validateReport(html);
+               
+               String expected = "junit.extensions.ActiveTestSuite.fActiveTestDeathCount";
+               
+               // expected string should be present exactly once
+               int pos = html.indexOf(expected);
+               assertTrue(pos > 0);
+               assertFalse(html.substring(pos + expected.length()).contains(expected));
+       }
+
 }