File tree Expand file tree Collapse file tree
src/test/java/net/datafaker/providers/base Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments