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 Message> |
assertThat(Iterable<M> messages)
Assert on a sequence of
Message s. |
static <M extends Message> |
assertThat(Map<?,M> map)
Assert on a map with
Message values. |
static ProtoSubject |
assertThat(Message message)
Assert on a single
Message instance. |
static LiteProtoSubject |
assertThat(MessageLite messageLite)
Assert on a single
MessageLite instance. |
static <M extends Message> |
assertThat(Multimap<?,M> multimap)
|
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 assertThat(@NullableDecl MessageLite messageLite)
MessageLite
instance.public static ProtoSubject assertThat(@NullableDecl Message message)
Message
instance.public static <M extends Message> IterableOfProtosSubject<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 <M extends Message> MapWithProtoValuesSubject<M> assertThat(@NullableDecl Map<?,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 <M extends Message> MultimapWithProtoValuesSubject<M> assertThat(@NullableDecl Multimap<?,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
.
Copyright © 2019. All rights reserved.