java.lang.Object
io.helidon.config.testing.CaseSensitivityTester
Simple framework for checking case-sensitive or case-insensitive behavior of containers such as headers and parameters.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
testLenient
(T dataStructure, BiFunction<T, String, Iterable<String>> valueGetter) Performs case-sensitive and case-insensitive testing of the supplied data, using lenient case matching: changing the case of a valid key should return the same results as when using the valid key.testMap()
static <T> void
testStrict
(T dataStructure, BiFunction<T, String, Iterable<String>> valueGetter) Performs case-sensitive and case-insensitive testing of the supplied data, using strict case matching: changing the case of a valid key should return no results.
-
Method Details
-
testMap
- Returns:
- test map containing data to populate containers under test
-
testStrict
public static <T> void testStrict(T dataStructure, BiFunction<T, String, Iterable<String>> valueGetter) Performs case-sensitive and case-insensitive testing of the supplied data, using strict case matching: changing the case of a valid key should return no results.- Type Parameters:
T
- type of the data structure- Parameters:
dataStructure
- data structure to be testedvalueGetter
- function which accepts a key and returns anIterable<String>
-
testLenient
public static <T> void testLenient(T dataStructure, BiFunction<T, String, Iterable<String>> valueGetter) Performs case-sensitive and case-insensitive testing of the supplied data, using lenient case matching: changing the case of a valid key should return the same results as when using the valid key.- Type Parameters:
T
- type of the data structure- Parameters:
dataStructure
- data structure to be testedvalueGetter
- function which accepts a key and returns anIterable<String>
-