5
5
6
6
import java .io .File ;
7
7
8
+ /**
9
+ * Note that it is important to test the case of all of the modules together,
10
+ * along with the cases of each module individually, as they behave differently.
11
+ */
8
12
public class ScalaMultiModuleCrossVersionTest extends ScoverageFunctionalTest {
9
13
10
14
public ScalaMultiModuleCrossVersionTest () {
11
15
super ("scala-multi-module-cross-version" );
12
16
}
13
17
14
18
@ Test
15
- public void checkAndAggregateScoverage () throws Exception {
19
+ public void checkAndAggregateAll () throws Exception {
16
20
17
21
AssertableBuildResult result = run ("clean" , ScoveragePlugin .getCHECK_NAME (),
18
22
ScoveragePlugin .getAGGREGATE_NAME ());
19
23
20
24
result .assertTaskSkipped (ScoveragePlugin .getREPORT_NAME ());
21
25
result .assertTaskSucceeded ("2_11:" + ScoveragePlugin .getREPORT_NAME ());
22
26
result .assertTaskSucceeded ("2_12:" + ScoveragePlugin .getREPORT_NAME ());
27
+ result .assertTaskSucceeded ("2_13:" + ScoveragePlugin .getREPORT_NAME ());
23
28
result .assertTaskSucceeded (ScoveragePlugin .getCHECK_NAME ());
24
29
result .assertTaskSucceeded ("2_11:" + ScoveragePlugin .getCHECK_NAME ());
25
30
result .assertTaskSucceeded ("2_12:" + ScoveragePlugin .getCHECK_NAME ());
31
+ result .assertTaskSucceeded ("2_13:" + ScoveragePlugin .getCHECK_NAME ());
26
32
result .assertTaskSucceeded (ScoveragePlugin .getAGGREGATE_NAME ());
27
33
28
34
assertAllReportFilesExist ();
29
35
assertCoverage (100.0 );
30
36
}
31
37
38
+ @ Test
39
+ public void report211 () throws Exception {
40
+
41
+ AssertableBuildResult result = run ("clean" , ":2_11:" + ScoveragePlugin .getREPORT_NAME ());
42
+ result .assertTaskSucceeded ("2_11:" + ScoveragePlugin .getREPORT_NAME ());
43
+ assert211ReportFilesExist ();
44
+ }
45
+
46
+ @ Test
47
+ public void report212 () throws Exception {
48
+
49
+ AssertableBuildResult result = run ("clean" , ":2_12:" + ScoveragePlugin .getREPORT_NAME ());
50
+ result .assertTaskSucceeded ("2_12:" + ScoveragePlugin .getREPORT_NAME ());
51
+ assert212ReportFilesExist ();
52
+ }
53
+
54
+ @ Test
55
+ public void report213 () throws Exception {
56
+
57
+ AssertableBuildResult result = run ("clean" , ":2_13:" + ScoveragePlugin .getREPORT_NAME ());
58
+ result .assertTaskSucceeded ("2_13:" + ScoveragePlugin .getREPORT_NAME ());
59
+ assert213ReportFilesExist ();
60
+ }
61
+
32
62
private void assertAllReportFilesExist () {
33
63
34
64
assert211ReportFilesExist ();
@@ -42,6 +72,7 @@ private void assertAggregationFilesExist() {
42
72
Assert .assertTrue (resolve (reportDir (), "index.html" ).exists ());
43
73
Assert .assertTrue (resolve (reportDir (), "2_11/src/main/scala/org/hello/World211.scala.html" ).exists ());
44
74
Assert .assertTrue (resolve (reportDir (), "2_12/src/main/scala/org/hello/World212.scala.html" ).exists ());
75
+ Assert .assertTrue (resolve (reportDir (), "2_13/src/main/scala/org/hello/World213.scala.html" ).exists ());
45
76
}
46
77
47
78
private void assert211ReportFilesExist () {
0 commit comments