public class IsMapContainingKey<K> extends TypeSafeMatcher<Map<? super K,?>>
Constructor and Description |
---|
IsMapContainingKey(Matcher<? super K> keyMatcher) |
Modifier and Type | Method and Description |
---|---|
void |
describeMismatchSafely(Map<? super K,?> map,
Description mismatchDescription)
Subclasses should override this.
|
void |
describeTo(Description description)
Generates a description of the object.
|
static <K> Matcher<Map<? super K,?>> |
hasKey(K key) |
static <K> Matcher<Map<? super K,?>> |
hasKey(Matcher<? super K> keyMatcher) |
boolean |
matchesSafely(Map<? super K,?> item)
Subclasses should implement this.
|
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
public boolean matchesSafely(Map<? super K,?> item)
TypeSafeMatcher
matchesSafely
in class TypeSafeMatcher<Map<? super K,?>>
public void describeMismatchSafely(Map<? super K,?> map, Description mismatchDescription)
TypeSafeMatcher
describeMismatchSafely
in class TypeSafeMatcher<Map<? super K,?>>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.Copyright © 2016. All rights reserved.