public final class ProtoTruth extends Object
Note: Usage of different failure strategies such as assume and expect should
rely on AbstractVerb.about(SubjectFactory) to begin a chain with those alternative
behaviors.
| Modifier and Type | Method and Description |
|---|---|
static <M extends com.google.protobuf.Message> |
assertThat(Iterable<M> messages)
Assert on a sequence of
Messages. |
static <K,M extends com.google.protobuf.Message> |
assertThat(com.google.common.collect.ListMultimap<K,M> listMultimap)
Assert on a
ListMultimap with Message values. |
static <K,M extends com.google.protobuf.Message> |
assertThat(Map<K,M> map)
Assert on a map with
Message values. |
static ProtoSubject<?,com.google.protobuf.Message> |
assertThat(com.google.protobuf.Message message)
Assert on a single
Message instance. |
static LiteProtoSubject<?,com.google.protobuf.MessageLite> |
assertThat(com.google.protobuf.MessageLite messageLite)
Assert on a single
MessageLite instance. |
static <K,M extends com.google.protobuf.Message> |
assertThat(com.google.common.collect.Multimap<K,M> multimap)
Assert on a
Multimap with Message values. |
static <K,M extends com.google.protobuf.Message> |
assertThat(com.google.common.collect.SetMultimap<K,M> setMultimap)
Assert on a
Multimap with Message values. |
static DelegatedVerbFactory<ProtoTruthDelegatedVerb> |
protos()
Returns a
DelegatedVerbFactory, akin to a SubjectFactory, which can be used to assert on multiple types of
Protos and collections containing them. |
public static DelegatedVerbFactory<ProtoTruthDelegatedVerb> protos()
DelegatedVerbFactory, akin to a SubjectFactory, which can be used to assert on multiple types of
Protos and collections containing them.public static LiteProtoSubject<?,com.google.protobuf.MessageLite> assertThat(@Nullable com.google.protobuf.MessageLite messageLite)
MessageLite instance.public static ProtoSubject<?,com.google.protobuf.Message> assertThat(@Nullable com.google.protobuf.Message message)
Message instance.public static <M extends com.google.protobuf.Message> IterableOfProtosSubject<?,M,Iterable<M>> assertThat(@Nullable Iterable<M> messages)
Messages.
This allows for the equality configurations on ProtoSubject to be applied to all
comparison tests available on IterableSubject#UsingCorrespondence.
public static <K,M extends com.google.protobuf.Message> MapWithProtoValuesSubject<?,K,M,Map<K,M>> assertThat(@Nullable Map<K,M> map)
Message values.
This allows for the equality configurations on ProtoSubject to be applied to all
comparison tests available on MapSubject#UsingCorrespondence.
public static <K,M extends com.google.protobuf.Message> MultimapWithProtoValuesSubject<?,K,M,com.google.common.collect.Multimap<K,M>> assertThat(@Nullable com.google.common.collect.Multimap<K,M> multimap)
Multimap with Message values.
This allows for the equality configurations on ProtoSubject to be applied to all
comparison tests available on MultimapSubject#UsingCorrespondence.
public static <K,M extends com.google.protobuf.Message> ListMultimapWithProtoValuesSubject<?,K,M,com.google.common.collect.ListMultimap<K,M>> assertThat(@Nullable com.google.common.collect.ListMultimap<K,M> listMultimap)
ListMultimap with Message values.
This allows for the equality configurations on ProtoSubject to be applied to all
comparison tests available on MultimapSubject#UsingCorrespondence.
public static <K,M extends com.google.protobuf.Message> SetMultimapWithProtoValuesSubject<?,K,M,com.google.common.collect.SetMultimap<K,M>> assertThat(@Nullable com.google.common.collect.SetMultimap<K,M> setMultimap)
Multimap with Message values.
This allows for the equality configurations on ProtoSubject to be applied to all
comparison tests available on MultimapSubject#UsingCorrespondence.
Copyright © 2017. All rights reserved.