1 | void testSpecialSignsInSrcPath() throws Exception {↵ | | 1 | void testWithStyleFromDirAndXslImport() throws Exception {↵
|
2 | executeTarget("testSpecialSignsInSrcPath");↵ | | 2 | executeTarget("testWithStyleFromDirAndXslImport");↵
|
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 | public void testSpecialSignsInHtmlPath() throws Exception {↵ | | 13 | public void testWithStyleFromClasspath() throws Exception {↵
|
14 | executeTarget("testSpecialSignsInHtmlPath");↵ | | 14 | executeTarget("testWithStyleFromClasspath");↵
|
15 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html# $%\u00A7&-!report/index.html");↵ | | 15 | File reportFile = new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/index.html");↵
|
16 | // tests one the file object↵ | | 16 | // tests one the file object↵
|
17 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵ | | 17 | assertTrue("No index.html present. Not generated?", reportFile.exists() );↵
|
18 | assertTrue("Cant read the report file.", reportFile.canRead() );↵ | | 18 | assertTrue("Cant read the report file.", reportFile.canRead() );↵
|
19 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵ | | 19 | assertTrue("File shouldnt be empty.", reportFile.length() > 0 );↵
|
20 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵ | | 20 | // conversion to URL via FileUtils like in XMLResultAggregator, not as suggested in the bug report↵
|
21 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵ | | 21 | URL reportUrl = new URL( FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) );↵
|
22 | InputStream reportStream = reportUrl.openStream();↵ | | 22 | InputStream reportStream = reportUrl.openStream();↵
|
23 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵ | | 23 | assertTrue("This shouldnt be an empty stream.", reportStream.available() > 0);↵
|
24 | | | 24 |
|