2
2
3
3
import org .junit .jupiter .api .AfterAll ;
4
4
import org .junit .jupiter .api .Test ;
5
+
5
6
import static org .junit .jupiter .api .Assertions .*;
6
7
7
8
import java .io .File ;
@@ -13,53 +14,45 @@ public class CoverageHTMLReporterAssetTest {
13
14
14
15
private static final String TEST_FOLDER = "__testAssets" ;
15
16
16
- private void testFileExists ( Path filePath )
17
- {
18
- File f = new File ( filePath .toUri () );
17
+ private void testFileExists (Path filePath ) {
18
+ File f = new File (filePath .toUri ());
19
19
20
20
assertTrue (f .exists (), () -> "File " + f .toString () + " does not exist" );
21
21
}
22
22
23
23
@ Test
24
- public void writeReporterAssetsTo ()
25
- {
26
- try {
27
- Path targetPath = Paths .get (TEST_FOLDER );
24
+ public void writeReporterAssetsTo () throws RuntimeException {
25
+ Path targetPath = Paths .get (TEST_FOLDER );
28
26
29
- // Act
30
- CoverageHTMLReporter .writeReportAssetsTo (targetPath );
27
+ // Act
28
+ CoverageHTMLReporter .writeReportAssetsTo (targetPath );
31
29
32
- testFileExists (targetPath .resolve (Paths .get ("colorbox" , "border.png" )));
33
- testFileExists (targetPath .resolve (Paths .get ("colorbox" , "controls.png" )));
34
- testFileExists (targetPath .resolve (Paths .get ("colorbox" , "loading.gif" )));
35
- testFileExists (targetPath .resolve (Paths .get ("colorbox" , "loading_background.png" )));
30
+ testFileExists (targetPath .resolve (Paths .get ("colorbox" , "border.png" )));
31
+ testFileExists (targetPath .resolve (Paths .get ("colorbox" , "controls.png" )));
32
+ testFileExists (targetPath .resolve (Paths .get ("colorbox" , "loading.gif" )));
33
+ testFileExists (targetPath .resolve (Paths .get ("colorbox" , "loading_background.png" )));
36
34
37
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_flat_0_aaaaaa_40x100.png" )));
38
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_flat_75_ffffff_40x100.png" )));
39
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_55_fbf9ee_1x400.png" )));
40
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_65_ffffff_1x400.png" )));
41
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_75_dadada_1x400.png" )));
42
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_75_e6e6e6_1x400.png" )));
43
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_95_fef1ec_1x400.png" )));
44
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_highlight-soft_75_cccccc_1x100.png" )));
45
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_2e83ff_256x240.png" )));
46
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_222222_256x240.png" )));
47
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_454545_256x240.png" )));
48
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_888888_256x240.png" )));
49
- testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_cd0a0a_256x240.png" )));
35
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_flat_0_aaaaaa_40x100.png" )));
36
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_flat_75_ffffff_40x100.png" )));
37
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_55_fbf9ee_1x400.png" )));
38
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_65_ffffff_1x400.png" )));
39
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_75_dadada_1x400.png" )));
40
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_75_e6e6e6_1x400.png" )));
41
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_glass_95_fef1ec_1x400.png" )));
42
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-bg_highlight-soft_75_cccccc_1x100.png" )));
43
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_2e83ff_256x240.png" )));
44
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_222222_256x240.png" )));
45
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_454545_256x240.png" )));
46
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_888888_256x240.png" )));
47
+ testFileExists (targetPath .resolve (Paths .get ("images" , "ui-icons_cd0a0a_256x240.png" )));
50
48
51
- testFileExists (targetPath .resolve (Paths .get ("application.css" )));
52
- testFileExists (targetPath .resolve (Paths .get ("application.js" )));
53
- testFileExists (targetPath .resolve (Paths .get ("favicon_green.png" )));
54
- testFileExists (targetPath .resolve (Paths .get ("favicon_red.png" )));
55
- testFileExists (targetPath .resolve (Paths .get ("favicon_yellow.png" )));
56
- testFileExists (targetPath .resolve (Paths .get ("loading.gif" )));
57
- testFileExists (targetPath .resolve (Paths .get ("magnify.png" )));
58
- }
59
- catch ( RuntimeException e )
60
- {
61
- fail (e );
62
- }
49
+ testFileExists (targetPath .resolve (Paths .get ("application.css" )));
50
+ testFileExists (targetPath .resolve (Paths .get ("application.js" )));
51
+ testFileExists (targetPath .resolve (Paths .get ("favicon_green.png" )));
52
+ testFileExists (targetPath .resolve (Paths .get ("favicon_red.png" )));
53
+ testFileExists (targetPath .resolve (Paths .get ("favicon_yellow.png" )));
54
+ testFileExists (targetPath .resolve (Paths .get ("loading.gif" )));
55
+ testFileExists (targetPath .resolve (Paths .get ("magnify.png" )));
63
56
64
57
}
65
58
0 commit comments