public class MultimapSubject extends Subject<MultimapSubject,com.google.common.collect.Multimap<?,?>>
Multimap
subjects.failureStrategy
Modifier and Type | Method and Description |
---|---|
void |
containsEntry(Object key,
Object value)
Fails if the multimap does not contain the given entry.
|
Ordered |
containsExactly(com.google.common.collect.Multimap<?,?> expectedMultimap)
Deprecated.
|
Ordered |
containsExactlyEntriesIn(com.google.common.collect.Multimap<?,?> expectedMultimap)
Fails if the Multimap does not contain precisely the same entries as the argument Multimap.
|
void |
containsKey(Object key)
Fails if the multimap does not contain the given key.
|
void |
doesNotContainEntry(Object key,
Object value)
Fails if the multimap contains the given entry.
|
void |
doesNotContainKey(Object key)
Fails if the multimap contains the given key.
|
void |
hasSize(int expectedSize)
Fails if the multimap does not have the given size.
|
void |
isEmpty()
Fails if the multimap is not empty.
|
void |
isEqualTo(Object other)
Fails if the subject is not equal to the given object.
|
void |
isNotEmpty()
Fails if the multimap is empty.
|
MultimapSubject |
named(String name)
Renames the subject so that this name appears in the error messages in place of string
representations of the subject.
|
IterableSubject |
valuesForKey(Object key)
Returns a context-aware Subject for making assertions about the values for the given key within
the Multimap.
|
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hashCode, internalCustomName, isAnyOf, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs
public MultimapSubject named(String name)
named
in class Subject<MultimapSubject,com.google.common.collect.Multimap<?,?>>
public void isEmpty()
public void isNotEmpty()
public void hasSize(int expectedSize)
public void containsKey(@Nullable Object key)
public void doesNotContainKey(@Nullable Object key)
public void containsEntry(@Nullable Object key, @Nullable Object value)
public void doesNotContainEntry(@Nullable Object key, @Nullable Object value)
public IterableSubject valuesForKey(@Nullable Object key)
This method performs no checks on its own and cannot cause test failures. Subsequent assertions must be chained onto this method call to test properties of the Multimap.
public void isEqualTo(@Nullable Object other)
Subject
Objects.equal(java.lang.Object, java.lang.Object)
Arrays#equals
overload
Byte
, Short
, Character
, Integer
, or Long
) and they are numerically equal when converted to Long
.
isEqualTo
in class Subject<MultimapSubject,com.google.common.collect.Multimap<?,?>>
public Ordered containsExactlyEntriesIn(com.google.common.collect.Multimap<?,?> expectedMultimap)
A subsequent call to Ordered.inOrder()
may be made if the caller wishes to verify that
the two Multimaps iterate fully in the same order. That is, their key sets iterate in the same
order, and the value collections for each key iterate in the same order.
@Deprecated public Ordered containsExactly(com.google.common.collect.Multimap<?,?> expectedMultimap)
containsExactlyEntriesIn(com.google.common.collect.Multimap<?, ?>)
instead.Copyright © 2016. All rights reserved.