adds support for fields as well as local variables.
[cfb.git] / test / net / jaekl / cfb / analyze / HtmlReportTest.java
index 26f9f8e13f06522d203dbe7b3872a463b556c251..0938cb73f186102c10e77ca5eca5c094b8ec6ce5 100644 (file)
@@ -196,4 +196,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));
+       }
+
 }