public class MultimapSubject<S extends MultimapSubject<S,K,V,M>,K,V,M extends com.google.common.collect.Multimap<K,V>> extends Subject<S,M>
Multimap
subjects.Subject.HasField
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)
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.
|
IterableSubject<? extends IterableSubject<?,V,? extends Collection<V>>,V,? extends Collection<V>> |
valuesForKey(K key)
Returns a context-aware Subject for making assertions about the values for the given key
within the Multimap.
|
protected static String |
valuesForKeyDisplaySubject(Object key,
Subject<?,?> valuesForKeySubject) |
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isInstanceOf, isNotA, isNotEqualTo, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled, named
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)
@CheckReturnValue public IterableSubject<? extends IterableSubject<?,V,? extends Collection<V>>,V,? extends Collection<V>> valuesForKey(@Nullable K 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(Object other)
Subject
public Ordered containsExactly(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.
Copyright © 2014. All rights reserved.