| Modifier and Type | Field and Description |
|---|---|
| private final Matcher | |
| private final Matcher |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | describeMismatchSafely(Map<? extends K, ? extends V> map, Description mismatchDescription)
Overrides org. |
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| public static <K, V> Matcher | hasEntry(Matcher<? super K>
the key matcher that, in combination with the valueMatcher, must be satisfied by at least one entry keyMatcher, Matcher<? super V> the value matcher that, in combination with the keyMatcher, must be satisfied by at least one entry valueMatcher)Creates a matcher for |
| public static <K, V> Matcher | hasEntry(K
the key that, in combination with the value, must be describe at least one entry key, V the value that, in combination with the key, must be describe at least one entry value)Creates a matcher for |
| public static <K> Matcher | hasKey(Matcher<? super K>
the matcher that must be satisfied by at least one key keyMatcher)Creates a matcher for |
| public static <K> Matcher | hasKey(K
the key that satisfying maps must contain key)Creates a matcher for |
| public static <V> Matcher | hasValue(Matcher<? super V>
the matcher that must be satisfied by at least one value valueMatcher)Creates a matcher for |
| public static <V> Matcher | hasValue(V
the value that satisfying maps must contain value)Creates a matcher for |
| public boolean | matchesSafely(Map<? extends K, ? extends V> map)
Implements abstract org. |
| keyMatcher | back to summary |
|---|---|
| private final Matcher<? super K> keyMatcher | |
| valueMatcher | back to summary |
|---|---|
| private final Matcher<? super V> valueMatcher | |
| IsMapContaining | back to summary |
|---|---|
| public IsMapContaining(Matcher<? super K> keyMatcher, Matcher<? super V> valueMatcher) | |
| describeMismatchSafely | back to summary |
|---|---|
| public void describeMismatchSafely(Map<? extends K, ? extends V> map, Description mismatchDescription) Overrides org. Doc from org. Subclasses should override this. The item will already have been checked for the specific type and will never be null.
| |
| describeTo | back to summary |
|---|---|
| public void describeTo(Description description) Implements org. Doc from org. Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.
| |
| hasEntry | back to summary |
|---|---|
| public static <K, V> Matcher Creates a matcher for For example: assertThat(myMap, hasEntry(equalTo("bar"), equalTo("foo")))
| |
| hasEntry | back to summary |
|---|---|
| public static <K, V> Matcher Creates a matcher for For example: assertThat(myMap, hasEntry("bar", "foo"))
| |
| hasKey | back to summary |
|---|---|
| public static <K> Matcher Creates a matcher for For example: assertThat(myMap, hasKey(equalTo("bar")))
| |
| hasKey | back to summary |
|---|---|
| public static <K> Matcher Creates a matcher for For example: assertThat(myMap, hasKey("bar"))
| |
| hasValue | back to summary |
|---|---|
| public static <V> Matcher Creates a matcher for For example: assertThat(myMap, hasValue(equalTo("foo")))
| |
| hasValue | back to summary |
|---|---|
| public static <V> Matcher Creates a matcher for For example: assertThat(myMap, hasValue("foo"))
| |
| matchesSafely | back to summary |
|---|---|
| public boolean matchesSafely(Map<? extends K, ? extends V> map) Implements abstract org. Doc from org. Subclasses should implement this. The item will already have been checked for the specific type and will never be null.
| |