@Test public void singleValuedMapShouldNotContainKeyForSingleValueWithKeyMismatch() { // given CaseInsensitiveRegexMultiMap multiMap = multiMap(new String[] {"keyOne", "keyOne_valueOne"}); // then assertThat(multiMap.containsKey(not("keyOne")), is(false)); }
@Test public void singleValuedMapShouldContainKeyForSingleValue() { // given CaseInsensitiveRegexMultiMap multiMap = multiMap(new String[] {"keyOne", "keyOne_valueOne"}); // then assertThat(multiMap.containsKey(not("notKeyOne")), is(true)); }
@Test public void multiValuedMapShouldNotContainKeyForMultipleValuesWithKeyMismatch() { // given CaseInsensitiveRegexMultiMap multiMap = multiMap( new String[] {"keyOne", "keyOne_valueOne"}, new String[] {"keyTwo", "keyTwo_valueOne", "keyTwo_valueTwo"}, new String[] { "keyThree", "keyThree_valueOne", "keyThree_valueTwo", "keyThree_valueThree" }); // then assertThat(multiMap.containsKey(not("key.*")), is(false)); }
@Test public void multiValuedMapShouldContainKeyForMultipleValues() { // given CaseInsensitiveRegexMultiMap multiMap = multiMap( new String[] {"keyOne", "keyOne_valueOne"}, new String[] {"keyTwo", "keyTwo_valueOne", "keyTwo_valueTwo"}, new String[] { "keyThree", "keyThree_valueOne", "keyThree_valueTwo", "keyThree_valueThree" }); // then assertThat(multiMap.containsKey(not("notKeyTwo")), is(true)); }