public final class ProtoTruth extends Object
Note: Usage of different failure strategies such as assume and expect should
rely on StandardSubjectBuilder.about(CustomSubjectBuilder.Factory)
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
Message s. |
static <K,M extends com.google.protobuf.Message> |
assertThat(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(Multimap<K,M> multimap)
Assert on a
Multimap with Message values. |
static <K,M extends com.google.protobuf.Message> |
assertThat(SetMultimap<K,M> setMultimap)
Assert on a
Multimap with Message values. |
static CustomSubjectBuilder.Factory<ProtoSubjectBuilder> |
protos()
Returns a
CustomSubjectBuilder.Factory , akin to a Subject.Factory , which can be used to assert on multiple types of
Protos and collections containing them. |
public static CustomSubjectBuilder.Factory<ProtoSubjectBuilder> protos()
CustomSubjectBuilder.Factory
, akin to a Subject.Factory
, which can be used to assert on multiple types of
Protos and collections containing them.public static LiteProtoSubject<?,com.google.protobuf.MessageLite> assertThat(@NullableDecl com.google.protobuf.MessageLite messageLite)
MessageLite
instance.public static ProtoSubject<?,com.google.protobuf.Message> assertThat(@NullableDecl com.google.protobuf.Message message)
Message
instance.public static <M extends com.google.protobuf.Message> IterableOfProtosSubject<?,M,Iterable<M>> assertThat(@NullableDecl Iterable<M> messages)
Message
s.
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(@NullableDecl 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,Multimap<K,M>> assertThat(@NullableDecl 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,ListMultimap<K,M>> assertThat(@NullableDecl 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,SetMultimap<K,M>> assertThat(@NullableDecl 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 © 2018. All rights reserved.