1 | void testWithStyleFromDir() throws Exception {↵ | | 1 | void testSpecialSignsInSrcPath() throws Exception {↵
|
2 | executeTarget("testWithStyleFromDir");↵ | | 2 | executeTarget("testSpecialSignsInSrcPath");↵
|
3 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/index.html");↵ | | 3 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/index.html");↵
|
4 | // tests one the file object↵ | | 4 | // tests one the file object↵
|
5 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵ | | 5 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵
|
6 | assertTrue("Cant read the report file.", reportFile.canRead() );↵ | | 6 | assertTrue("Cant read the report file.", reportFile.canRead() );↵
|
7 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵ | | 7 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵
|
8 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵ | | 8 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵
|
9 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵ | | 9 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵
|
10 | InputStream reportStream = reportUrl.openStream();↵ | | 10 | InputStream reportStream = reportUrl.openStream();↵
|
11 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵ | | 11 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵
|
12 | }↵ | | 12 | }↵
|
|
13 | //Bugzilla Report 40021↵ | | 13 | ↵
|
14 | public void testNoFrames() throws Exception {↵ | | 14 | public void testSpecialSignsInHtmlPath() throws Exception {↵
|
15 | executeTarget("testNoFrames");↵ | | 15 | executeTarget("testSpecialSignsInHtmlPath");↵
|
16 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/junit-noframes.html");↵ | | 16 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html# $%\u00A7&-!report/index.html");↵
|
17 | // tests one the file object↵ | | 17 | // tests one the file object↵
|
18 | assertTrue("No junit-noframes.html present. Not generated?", reportFile.exists() );↵ | | 18 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵
|
19 | assertTrue("Cant read the report file.", reportFile.canRead() );↵ | | 19 | assertTrue("Cant read the report file.", reportFile.canRead() );↵
|
20 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵ | | 20 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵
|
21 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵ | | 21 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵
|
22 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵ | | 22 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵
|
23 | InputStream reportStream = reportUrl.openStream();↵ | | 23 | InputStream reportStream = reportUrl.openStream();↵
|
24 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵ | | 24 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵
|
25 | }↵ | | 25 | }↵
|
|
26 | //Bugzilla Report 39708↵ | | 26 | //Bugzilla Report 39708↵
|
27 | public void testWithStyleFromDirAndXslImport() throws Exception {↵ | | 27 | public void testWithStyleFromDir() throws Exception {↵
|
28 | executeTarget("testWithStyleFromDirAndXslImport");↵ | | 28 | executeTarget("testWithStyleFromDir");↵
|
29 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/index.html");↵ | | 29 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/index.html");↵
|
30 | // tests one the file object↵ | | 30 | // tests one the file object↵
|
31 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵ | | 31 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵
|
32 | assertTrue("Cant read the report file.", reportFile.canRead() );↵ | | 32 | assertTrue("Cant read the report file.", reportFile.canRead() );↵
|
33 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵ | | 33 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵
|
34 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵ | | 34 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵
|
35 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵ | | 35 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵
|
36 | InputStream reportStream = reportUrl.openStream();↵ | | 36 | InputStream reportStream = reportUrl.openStream();↵
|
37 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵ | | 37 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵
|
38 | }↵ | | 38 | }↵
|
|
39 | public void testWithStyleFromClasspath↵ | | 39 | //Bugzilla Report 40021↵
|
40 | () throws Exception {↵ | | 40 | public void testNoFrames() throws Exception {↵
|
41 | executeTarget("testWithStyleFromClasspath");↵ | | 41 | executeTarget("testNoFrames");↵
|
42 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/index.html");↵ | | 42 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/junit-noframes.html");↵
|
43 | // tests one the file object↵ | | 43 | // tests one the file object↵
|
44 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵ | | 44 | assertTrue("No junit-noframes.html present. Not generated?", reportFile.exists() );↵
|
45 | assertTrue("Cant read the report file.", reportFile.canRead() );↵ | | 45 | assertTrue("Cant read the report file.", reportFile.canRead() );↵
|
46 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵ | | 46 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵
|
47 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵ | | 47 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵
|
48 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵ | | 48 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵
|
49 | InputStream reportStream = reportUrl.openStream();↵ | | 49 | InputStream reportStream = reportUrl.openStream();↵
|
50 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵ | | 50 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵
|
51 | | | 51 |
|