Class CaseSensitivityTester

java.lang.Object
io.helidon.config.testing.CaseSensitivityTester

public class CaseSensitivityTester extends Object
Simple framework for checking case-sensitive or case-insensitive behavior of containers such as headers and parameters.
  • Method Details

    • testMap

      public static Map<String,List<String>> 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 tested
      valueGetter - function which accepts a key and returns an Iterable<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 tested
      valueGetter - function which accepts a key and returns an Iterable<String>