1717
1818class IncludeExcludePredicateTest {
1919
20- private static final Predicate <String > exactInclude =
20+ private static final Predicate <String > EXACT_INCLUDE =
2121 IncludeExcludePredicate .createExactMatching (singletonList ("foo" ), null );
22- private static final Predicate <String > exactExclude =
22+ private static final Predicate <String > EXACT_EXCLUDE =
2323 IncludeExcludePredicate .createExactMatching (null , singletonList ("bar" ));
24- private static final Predicate <String > exactIncludeAndExclude =
24+ private static final Predicate <String > EXACT_INCLUDE_AND_EXCLUDE =
2525 IncludeExcludePredicate .createExactMatching (singletonList ("foo" ), singletonList ("bar" ));
26- private static final Predicate <String > exactMulti =
26+ private static final Predicate <String > EXACT_MULTI =
2727 IncludeExcludePredicate .createExactMatching (asList ("foo" , "fooo" ), asList ("bar" , "barr" ));
2828
29- private static final Predicate <String > patternInclude =
29+ private static final Predicate <String > PATTERN_INCLUDE =
3030 IncludeExcludePredicate .createPatternMatching (singletonList ("f?o" ), null );
31- private static final Predicate <String > patternExclude =
31+ private static final Predicate <String > PATTERN_EXCLUDE =
3232 IncludeExcludePredicate .createPatternMatching (null , singletonList ("b?r" ));
33- private static final Predicate <String > patternIncludeAndExclude =
33+ private static final Predicate <String > PATTERN_INCLUDE_AND_EXCLUDE =
3434 IncludeExcludePredicate .createPatternMatching (singletonList ("f?o" ), singletonList ("b?r" ));
35- private static final Predicate <String > patternMulti =
35+ private static final Predicate <String > PATTERN_MULTI =
3636 IncludeExcludePredicate .createPatternMatching (asList ("f?o" , "f?oo" ), asList ("b?r" , "b?rr" ));
3737
3838 @ ParameterizedTest
@@ -45,42 +45,42 @@ private static Stream<Arguments> testArgs() {
4545 return Stream .of (
4646 // exact matching
4747 // include only
48- Arguments .of (exactInclude , "foo" , true ),
49- Arguments .of (exactInclude , "bar" , false ),
50- Arguments .of (exactInclude , "baz" , false ),
48+ Arguments .of (EXACT_INCLUDE , "foo" , true ),
49+ Arguments .of (EXACT_INCLUDE , "bar" , false ),
50+ Arguments .of (EXACT_INCLUDE , "baz" , false ),
5151 // exclude only
52- Arguments .of (exactExclude , "foo" , true ),
53- Arguments .of (exactExclude , "bar" , false ),
54- Arguments .of (exactExclude , "baz" , true ),
52+ Arguments .of (EXACT_EXCLUDE , "foo" , true ),
53+ Arguments .of (EXACT_EXCLUDE , "bar" , false ),
54+ Arguments .of (EXACT_EXCLUDE , "baz" , true ),
5555 // include and exclude
56- Arguments .of (exactIncludeAndExclude , "foo" , true ),
57- Arguments .of (exactIncludeAndExclude , "bar" , false ),
58- Arguments .of (exactIncludeAndExclude , "baz" , false ),
56+ Arguments .of (EXACT_INCLUDE_AND_EXCLUDE , "foo" , true ),
57+ Arguments .of (EXACT_INCLUDE_AND_EXCLUDE , "bar" , false ),
58+ Arguments .of (EXACT_INCLUDE_AND_EXCLUDE , "baz" , false ),
5959 // multi
60- Arguments .of (exactMulti , "foo" , true ),
61- Arguments .of (exactMulti , "fooo" , true ),
62- Arguments .of (exactMulti , "bar" , false ),
63- Arguments .of (exactMulti , "barr" , false ),
64- Arguments .of (exactMulti , "baz" , false ),
60+ Arguments .of (EXACT_MULTI , "foo" , true ),
61+ Arguments .of (EXACT_MULTI , "fooo" , true ),
62+ Arguments .of (EXACT_MULTI , "bar" , false ),
63+ Arguments .of (EXACT_MULTI , "barr" , false ),
64+ Arguments .of (EXACT_MULTI , "baz" , false ),
6565 // pattern matching
6666 // include only
67- Arguments .of (patternInclude , "foo" , true ),
68- Arguments .of (patternInclude , "bar" , false ),
69- Arguments .of (patternInclude , "baz" , false ),
67+ Arguments .of (PATTERN_INCLUDE , "foo" , true ),
68+ Arguments .of (PATTERN_INCLUDE , "bar" , false ),
69+ Arguments .of (PATTERN_INCLUDE , "baz" , false ),
7070 // exclude only
71- Arguments .of (patternExclude , "foo" , true ),
72- Arguments .of (patternExclude , "bar" , false ),
73- Arguments .of (patternExclude , "baz" , true ),
71+ Arguments .of (PATTERN_EXCLUDE , "foo" , true ),
72+ Arguments .of (PATTERN_EXCLUDE , "bar" , false ),
73+ Arguments .of (PATTERN_EXCLUDE , "baz" , true ),
7474 // include and exclude
75- Arguments .of (patternIncludeAndExclude , "foo" , true ),
76- Arguments .of (patternIncludeAndExclude , "bar" , false ),
77- Arguments .of (patternIncludeAndExclude , "baz" , false ),
75+ Arguments .of (PATTERN_INCLUDE_AND_EXCLUDE , "foo" , true ),
76+ Arguments .of (PATTERN_INCLUDE_AND_EXCLUDE , "bar" , false ),
77+ Arguments .of (PATTERN_INCLUDE_AND_EXCLUDE , "baz" , false ),
7878 // multi
79- Arguments .of (patternMulti , "foo" , true ),
80- Arguments .of (patternMulti , "fooo" , true ),
81- Arguments .of (patternMulti , "bar" , false ),
82- Arguments .of (patternMulti , "barr" , false ),
83- Arguments .of (patternMulti , "baz" , false ));
79+ Arguments .of (PATTERN_MULTI , "foo" , true ),
80+ Arguments .of (PATTERN_MULTI , "fooo" , true ),
81+ Arguments .of (PATTERN_MULTI , "bar" , false ),
82+ Arguments .of (PATTERN_MULTI , "barr" , false ),
83+ Arguments .of (PATTERN_MULTI , "baz" , false ));
8484 }
8585
8686 @ ParameterizedTest
@@ -92,24 +92,24 @@ void stringRepresentation(Predicate<String> predicate, String exepectedString) {
9292 private static Stream <Arguments > stringRepresentationArgs () {
9393 return Stream .of (
9494 Arguments .of (
95- exactInclude , "IncludeExcludePredicate{globMatchingEnabled=false, included=[foo]}" ),
95+ EXACT_INCLUDE , "IncludeExcludePredicate{globMatchingEnabled=false, included=[foo]}" ),
9696 Arguments .of (
97- exactExclude , "IncludeExcludePredicate{globMatchingEnabled=false, excluded=[bar]}" ),
97+ EXACT_EXCLUDE , "IncludeExcludePredicate{globMatchingEnabled=false, excluded=[bar]}" ),
9898 Arguments .of (
99- exactIncludeAndExclude ,
99+ EXACT_INCLUDE_AND_EXCLUDE ,
100100 "IncludeExcludePredicate{globMatchingEnabled=false, included=[foo], excluded=[bar]}" ),
101101 Arguments .of (
102- exactMulti ,
102+ EXACT_MULTI ,
103103 "IncludeExcludePredicate{globMatchingEnabled=false, included=[foo, fooo], excluded=[bar, barr]}" ),
104104 Arguments .of (
105- patternInclude , "IncludeExcludePredicate{globMatchingEnabled=true, included=[f?o]}" ),
105+ PATTERN_INCLUDE , "IncludeExcludePredicate{globMatchingEnabled=true, included=[f?o]}" ),
106106 Arguments .of (
107- patternExclude , "IncludeExcludePredicate{globMatchingEnabled=true, excluded=[b?r]}" ),
107+ PATTERN_EXCLUDE , "IncludeExcludePredicate{globMatchingEnabled=true, excluded=[b?r]}" ),
108108 Arguments .of (
109- patternIncludeAndExclude ,
109+ PATTERN_INCLUDE_AND_EXCLUDE ,
110110 "IncludeExcludePredicate{globMatchingEnabled=true, included=[f?o], excluded=[b?r]}" ),
111111 Arguments .of (
112- patternMulti ,
112+ PATTERN_MULTI ,
113113 "IncludeExcludePredicate{globMatchingEnabled=true, included=[f?o, f?oo], excluded=[b?r, b?rr]}" ));
114114 }
115115}
0 commit comments