Skip to content

Commit 47adff2

Browse files
committed
Reorganise integration tests into subpackages
1 parent 79c2a9f commit 47adff2

File tree

8 files changed

+73
-10
lines changed

8 files changed

+73
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.github.ascopes.jct.tests.integration;
16+
package io.github.ascopes.jct.tests.integration.compilation;
1717

1818
import static io.github.ascopes.jct.assertions.JctAssertions.assertThatCompilation;
1919

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.github.ascopes.jct.tests.integration;
16+
package io.github.ascopes.jct.tests.integration.compilation;
1717

1818
import static io.github.ascopes.jct.assertions.JctAssertions.assertThatCompilation;
1919

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.github.ascopes.jct.tests.integration;
16+
package io.github.ascopes.jct.tests.integration.compilation;
1717

1818
import static io.github.ascopes.jct.assertions.JctAssertions.assertThatCompilation;
1919

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.github.ascopes.jct.tests.integration;
16+
package io.github.ascopes.jct.tests.integration.compilation;
1717

1818
import static io.github.ascopes.jct.assertions.JctAssertions.assertThat;
1919

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.github.ascopes.jct.tests.integration;
16+
package io.github.ascopes.jct.tests.integration.compilation;
1717

1818
import static io.github.ascopes.jct.assertions.JctAssertions.assertThatCompilation;
1919

@@ -56,7 +56,13 @@ void compileSourcesToClassesAndProvideThemInClassPathToSecondCompilation(
5656
);
5757

5858
var firstCompilation = compiler.compile(firstWorkspace);
59-
assertThatCompilation(firstCompilation).isSuccessfulWithoutWarnings();
59+
assertThatCompilation(firstCompilation)
60+
.isSuccessfulWithoutWarnings()
61+
.classOutput()
62+
.packages()
63+
.fileExists("org", "example", "first", "Adder.class")
64+
.isRegularFile()
65+
.isNotEmptyFile();
6066

6167
secondWorkspace.addClassPathPackage(firstWorkspace.getClassOutputPackages().get(0).getPath());
6268
secondWorkspace.createSourcePathPackage()
@@ -75,7 +81,13 @@ void compileSourcesToClassesAndProvideThemInClassPathToSecondCompilation(
7581
);
7682

7783
var secondCompilation = compiler.compile(secondWorkspace);
78-
assertThatCompilation(secondCompilation).isSuccessfulWithoutWarnings();
84+
assertThatCompilation(secondCompilation)
85+
.isSuccessfulWithoutWarnings()
86+
.classOutput()
87+
.packages()
88+
.fileExists("org", "example", "second", "Main.class")
89+
.isRegularFile()
90+
.isNotEmptyFile();
7991
}
8092
}
8193

@@ -105,7 +117,14 @@ void compileSourcesToClassesAndProvideThemInClassPathToSecondCompilationWithinJa
105117
);
106118

107119
var firstCompilation = compiler.compile(firstWorkspace);
108-
assertThatCompilation(firstCompilation).isSuccessfulWithoutWarnings();
120+
assertThatCompilation(firstCompilation)
121+
.isSuccessfulWithoutWarnings()
122+
.classOutput()
123+
.packages()
124+
.fileExists("org", "example", "first", "Adder.class")
125+
.isRegularFile()
126+
.isNotEmptyFile();
127+
109128
firstWorkspace
110129
.createClassOutputPackage()
111130
.createFile("first.jar")
@@ -129,7 +148,13 @@ void compileSourcesToClassesAndProvideThemInClassPathToSecondCompilationWithinJa
129148
);
130149

131150
var secondCompilation = compiler.compile(secondWorkspace);
132-
assertThatCompilation(secondCompilation).isSuccessfulWithoutWarnings();
151+
assertThatCompilation(secondCompilation)
152+
.isSuccessfulWithoutWarnings()
153+
.classOutput()
154+
.packages()
155+
.fileExists("org", "example", "second", "Main.class")
156+
.isRegularFile()
157+
.isNotEmptyFile();
133158
}
134159
}
135160
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (C) 2022 - 2023, the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
@NullMarked
17+
package io.github.ascopes.jct.tests.integration.compilation;
18+
19+
import org.jspecify.annotations.NullMarked;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.github.ascopes.jct.tests.integration;
16+
package io.github.ascopes.jct.tests.integration.junit;
1717

1818

1919
import static org.assertj.core.api.Assertions.assertThat;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (C) 2022 - 2023, the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
@NullMarked
17+
package io.github.ascopes.jct.tests.integration.junit;
18+
19+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)