Package | Description |
---|---|
com.google.common.truth |
Truth is an open source, fluent testing framework for Java that is designed to make your test
assertions and failure messages more readable.
|
com.google.common.truth.extensions.proto |
Custom subjects for testing Protocol
Buffer instances.
|
com.google.common.truth.extensions.re2j |
Modifier and Type | Interface and Description |
---|---|
static interface |
ExpectFailure.SimpleSubjectBuilderCallback<S extends Subject<S,A>,A>
A "functional interface" for
expectFailureAbout() to invoke and
capture failures. |
class |
SimpleSubjectBuilder<SubjectT extends Subject<SubjectT,ActualT>,ActualT>
In a fluent assertion chain, exposes the most common
that method, which accepts a value
under test and returns a Subject . |
class |
Subject<S extends Subject<S,T>,T>
An object that lets you perform checks on the value under test.
|
static interface |
Subject.Factory<SubjectT extends Subject<SubjectT,ActualT>,ActualT>
|
Modifier and Type | Class and Description |
---|---|
class |
AtomicLongMapSubject
Propositions for
AtomicLongMap subjects. |
class |
BigDecimalSubject
Propositions for
BigDecimal typed subjects. |
class |
BooleanSubject
Propositions for boolean subjects.
|
class |
ClassSubject
Propositions for
Class subjects. |
class |
ComparableSubject<S extends ComparableSubject<S,T>,T extends Comparable>
Propositions for
Comparable typed subjects. |
class |
DefaultSubject |
class |
DoubleSubject
Propositions for
Double subjects. |
class |
FloatSubject
Propositions for
Float subjects. |
class |
GuavaOptionalSubject
Propositions for Guava
Optional subjects. |
class |
IntegerSubject
Propositions for
Integer subjects. |
class |
IntStreamSubject
Propositions for
IntStream subjects. |
class |
IterableSubject
Propositions for
Iterable subjects. |
class |
ListMultimapSubject
Type-specific extensions of
Multimap subjects for ListMultimap subjects. |
class |
LongStreamSubject
Propositions for
LongStream subjects. |
class |
LongSubject
Propositions for
long subjects. |
class |
MapSubject
Propositions for
Map subjects. |
class |
MultimapSubject
Propositions for
Multimap subjects. |
class |
MultisetSubject
Propositions for
Multiset subjects. |
class |
ObjectArraySubject<T>
A Subject for
Object[] and more generically T[] . |
class |
OptionalDoubleSubject
Propositions for Java 8
OptionalDouble subjects. |
class |
OptionalIntSubject
Propositions for Java 8
OptionalInt subjects. |
class |
OptionalLongSubject
Propositions for Java 8
OptionalLong subjects. |
class |
OptionalSubject
Propositions for Java 8
Optional subjects. |
class |
PathSubject
Assertions for
Path instances. |
class |
PrimitiveBooleanArraySubject
A Subject for
boolean[] . |
class |
PrimitiveByteArraySubject
A Subject for
byte[] . |
class |
PrimitiveCharArraySubject
A Subject for
char[] . |
class |
PrimitiveDoubleArraySubject
A Subject for
double[] . |
class |
PrimitiveFloatArraySubject
A Subject for
float[] . |
class |
PrimitiveIntArraySubject
A Subject for
int[] . |
class |
PrimitiveLongArraySubject
A Subject for
long[] . |
class |
PrimitiveShortArraySubject
A Subject for
short[] . |
class |
SetMultimapSubject
Type-specific extensions of
Multimap subjects for SetMultimap subjects. |
class |
SortedMapSubject
Tests for
SortedMap and NavigableMap objects. |
class |
SortedSetSubject
Tests for
SortedSet and NavigableSet objects. |
class |
StreamSubject
Propositions for
Stream subjects. |
class |
StringSubject
Propositions for string subjects.
|
class |
TableSubject
Propositions for
Table subjects. |
class |
ThrowableSubject
Propositions for
Throwable subjects. |
class |
TruthFailureSubject
Subject for
AssertionError objects thrown by Truth. |
Modifier and Type | Method and Description |
---|---|
<S extends Subject<S,A>,A> |
StandardSubjectBuilder.about(Subject.Factory<S,A> factory)
Given a factory for some
Subject class, returns a builder whose that(actual)
method creates instances of that class. |
static <S extends Subject<S,T>,T> |
Truth.assertAbout(Subject.Factory<S,T> factory)
Given a factory for some
Subject class, returns a builder whose that(actual)
method creates instances of that class. |
static <S extends Subject<S,A>,A> |
ExpectFailure.expectFailureAbout(Subject.Factory<S,A> factory,
ExpectFailure.SimpleSubjectBuilderCallback<S,A> assertionCallback)
Static alternative that directly returns the triggered failure.
|
Modifier and Type | Method and Description |
---|---|
static Subject<DefaultSubject,Object> |
Truth.assertThat(Object actual) |
Subject<DefaultSubject,Object> |
StandardSubjectBuilder.that(Object actual) |
Modifier and Type | Class and Description |
---|---|
class |
IterableOfProtosSubject<S extends IterableOfProtosSubject<S,M,C>,M extends com.google.protobuf.Message,C extends Iterable<M>>
Truth subject for the iterables of protocol buffers.
|
static class |
IterableOfProtosSubject.IterableOfMessagesSubject<M extends com.google.protobuf.Message>
Default implementation of
IterableOfProtosSubject . |
class |
ListMultimapWithProtoValuesSubject<S extends ListMultimapWithProtoValuesSubject<S,K,M,C>,K,M extends com.google.protobuf.Message,C extends ListMultimap<K,M>>
Type-specific extension of
MultimapWithProtoValuesSubject , used to detect bad usages of
ListMultimapWithProtoValuesSubject.isEqualTo(com.google.common.collect.SetMultimap<?, ?>) . |
static class |
ListMultimapWithProtoValuesSubject.ListMultimapWithMessageValuesSubject<K,M extends com.google.protobuf.Message>
Default implementation of
ListMultimapWithProtoValuesSubject . |
class |
LiteProtoSubject<S extends LiteProtoSubject<S,M>,M extends com.google.protobuf.MessageLite>
Truth subjects for the Lite version of Protocol Buffers.
|
class |
MapWithProtoValuesSubject<S extends MapWithProtoValuesSubject<S,K,M,C>,K,M extends com.google.protobuf.Message,C extends Map<K,M>>
Truth subject for maps with protocol buffers for values.
|
static class |
MapWithProtoValuesSubject.MapWithMessageValuesSubject<K,M extends com.google.protobuf.Message>
Default implementation of
MapWithProtoValuesSubject . |
class |
MultimapWithProtoValuesSubject<S extends MultimapWithProtoValuesSubject<S,K,M,C>,K,M extends com.google.protobuf.Message,C extends Multimap<K,M>>
Truth subject for
Multimap s with protocol buffers for values. |
static class |
MultimapWithProtoValuesSubject.MultimapWithMessageValuesSubject<K,M extends com.google.protobuf.Message>
Default implementation of
MultimapWithProtoValuesSubject . |
class |
ProtoSubject<S extends ProtoSubject<S,M>,M extends com.google.protobuf.Message>
Truth subject for the full version of Protocol Buffers.
|
class |
SetMultimapWithProtoValuesSubject<S extends SetMultimapWithProtoValuesSubject<S,K,M,C>,K,M extends com.google.protobuf.Message,C extends SetMultimap<K,M>>
Type-specific extension of
MultimapWithProtoValuesSubject , used to detect bad usages of
SetMultimapWithProtoValuesSubject.isEqualTo(com.google.common.collect.ListMultimap<?, ?>) . |
static class |
SetMultimapWithProtoValuesSubject.SetMultimapWithMessageValuesSubject<K,M extends com.google.protobuf.Message>
Default implementation of
SetMultimapWithProtoValuesSubject . |
Modifier and Type | Class and Description |
---|---|
static class |
Re2jSubjects.Re2jStringSubject
Subject for
String subjects which you can use to assert things about Pattern regexes. |
Copyright © 2018. All rights reserved.