GH-520 - Early reject invalid ApplicationModules bootstraps.
We now immediately reject the ApplicationModules bootstrap in case the initial scanning of the root packages yield no classes at all.
This commit is contained in:
@@ -21,6 +21,7 @@ import example.declared.first.First;
|
||||
import example.declared.fourth.Fourth;
|
||||
import example.declared.second.Second;
|
||||
import example.declared.third.Third;
|
||||
import example.empty.EmptyApplication;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -234,6 +235,13 @@ class ApplicationModulesIntegrationTest {
|
||||
.noneMatch(it -> it.contains("Cycle detected: Slice open"));
|
||||
}
|
||||
|
||||
@Test // GH-520
|
||||
void bootstrapsOnEmptyProject() {
|
||||
|
||||
assertThatNoException().isThrownBy(() -> ApplicationModules.of(EmptyApplication.class).verify());
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> ApplicationModules.of("non.existant"));
|
||||
}
|
||||
|
||||
private static void verifyNamedInterfaces(NamedInterfaces interfaces, String name, Class<?>... types) {
|
||||
|
||||
Stream.of(types).forEach(type -> {
|
||||
|
||||
Reference in New Issue
Block a user