mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 12:45:57 +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 java.util.List;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.empty;
|
import static org.hamcrest.Matchers.empty;
|
||||||
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.not;
|
import static org.hamcrest.Matchers.not;
|
||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
@ -27,6 +28,7 @@ public class CodeClimateConfigTest {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
assertThat(excludePaths, not(empty()));
|
assertThat(excludePaths, not(empty()));
|
||||||
|
removeTestsExclusionOrThrow(excludePaths);
|
||||||
for (String path : excludePaths) {
|
for (String path : excludePaths) {
|
||||||
verifySourceFileExists(path);
|
verifySourceFileExists(path);
|
||||||
}
|
}
|
||||||
@ -45,4 +47,10 @@ public class CodeClimateConfigTest {
|
|||||||
fail("Path '" + path + "' does not exist!");
|
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