build: remove unused archunit dependency
This commit is contained in:
@@ -243,6 +243,18 @@ class MavenModuleProfileTest {
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void buildSurfaceDoesNotManageArchUnitWhenThereAreNoArchitectureTests() throws Exception {
|
||||
Document pom = rootPom();
|
||||
|
||||
assertThat(hasProjectProperty(pom, "archunit.version"))
|
||||
.isFalse();
|
||||
assertThat(hasDependency(pom, "com.tngtech.archunit", "archunit-junit5"))
|
||||
.isFalse();
|
||||
assertThat(javaSourcesContain("import com.tngtech." + "archunit"))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void productionDocsDoNotAdvertiseMemorySessionStore() throws Exception {
|
||||
String runbook = Files.readString(repositoryRoot()
|
||||
@@ -489,11 +501,19 @@ class MavenModuleProfileTest {
|
||||
}
|
||||
|
||||
private static boolean productionJavaContains(String token) throws Exception {
|
||||
return javaSourcesContain(token, false);
|
||||
}
|
||||
|
||||
private static boolean javaSourcesContain(String token) throws Exception {
|
||||
return javaSourcesContain(token, true);
|
||||
}
|
||||
|
||||
private static boolean javaSourcesContain(String token, boolean includeTests) throws Exception {
|
||||
try (Stream<Path> files = Files.walk(repositoryRoot().resolve("modules"))) {
|
||||
return files
|
||||
.filter(Files::isRegularFile)
|
||||
.filter(path -> path.toString().endsWith(".java"))
|
||||
.filter(path -> !path.toString().contains("/src/test/"))
|
||||
.filter(path -> includeTests || !path.toString().contains("/src/test/"))
|
||||
.anyMatch(path -> {
|
||||
try {
|
||||
return Files.readString(path).contains(token);
|
||||
|
||||
Reference in New Issue
Block a user