Skip to content

Commit 81e529f

Browse files
authored
remove unneeded test testNoDuplications (#1652)
The check for duplicates has been implemented in a more generic NoDuplicatesInYmlTest
1 parent ad01d4c commit 81e529f

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

src/test/java/net/datafaker/providers/base/ProviderListTest.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,11 @@ protected void testProviderList(TestSpec testSpec) {
4444
}
4545
}
4646

47-
@ParameterizedTest
48-
@MethodSource("providerListTest")
49-
void testNoDuplications(TestSpec testSpec) {
50-
T faker = getFaker();
51-
var terms = getBaseList(faker, testSpec.key);
52-
53-
Set<String> uniques = new HashSet<>();
54-
Set<String> duplicates = new HashSet<>();
55-
for (String term : terms) {
56-
if (!uniques.add(term)) {
57-
duplicates.add(term);
58-
}
59-
}
60-
assertThat(duplicates)
61-
.as(() -> "Check no duplications in " + testSpec.key + " with terms " + terms)
62-
.isEmpty();
63-
}
64-
6547
protected abstract Collection<TestSpec> providerListTest();
6648

6749
protected static class TestSpec {
6850
private final Supplier<?> supplier;
6951
private final String key;
70-
@SuppressWarnings("unused")
7152
private final String regex;
7253

7354
private TestSpec(Supplier<?> supplier, String key, String regex) {

0 commit comments

Comments
 (0)