mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 07:39:42 +01:00
Fix CodeClimate config test to account for new test exclusion entry
This commit is contained in:
parent
6cf2535109
commit
c37c0ce436
@ -8,6 +8,7 @@ import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.fail;
|
||||
@ -27,6 +28,7 @@ public class CodeClimateConfigTest {
|
||||
|
||||
// then
|
||||
assertThat(excludePaths, not(empty()));
|
||||
removeTestsExclusionOrThrow(excludePaths);
|
||||
for (String path : excludePaths) {
|
||||
verifySourceFileExists(path);
|
||||
}
|
||||
@ -45,4 +47,10 @@ public class CodeClimateConfigTest {
|
||||
fail("Path '" + path + "' does not exist!");
|
||||
}
|
||||
}
|
||||
|
||||
private static void removeTestsExclusionOrThrow(List<String> excludePaths) {
|
||||
boolean wasRemoved = excludePaths.removeIf("src/test/java/**Test.java"::equals);
|
||||
assertThat("Expected an exclusion for test classes",
|
||||
wasRemoved, equalTo(true));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user