com.google.common.truth
Class MapSubject<S extends MapSubject<S,K,V,M>,K,V,M extends Map<K,V>>
java.lang.Object
com.google.common.truth.Subject<S,M>
com.google.common.truth.MapSubject<S,K,V,M>
public class MapSubject<S extends MapSubject<S,K,V,M>,K,V,M extends Map<K,V>>
- extends Subject<S,M>
- Author:
- Christian Gruber ([email protected])
Methods inherited from class com.google.common.truth.Subject |
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, labeled, named |
MapSubject
public MapSubject(FailureStrategy failureStrategy,
M map)
isEmpty
public void isEmpty()
- Attests that the subject holds no objects, or fails.
isNotEmpty
public void isNotEmpty()
- Attests that the subject holds one or more objects, or fails
hasKey
public MapSubject.WithValue<V> hasKey(K key)
- Attests that the subject contains the provided key or fails.
lacksKey
public void lacksKey(K key)
hasValue
public void hasValue(V key)
lacksValue
public void lacksValue(V key)
create
public static <K,V,M extends Map<K,V>> MapSubject<? extends MapSubject<?,K,V,M>,K,V,M> create(FailureStrategy failureStrategy,
Map<K,V> map)
Copyright © 2014. All rights reserved.