Package | Description |
---|---|
com.google.common.truth |
Truth is a library for performing assertions in tests:
|
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,A>
A "functional interface" for
expectFailureAbout() to invoke and
capture failures. |
class |
SimpleSubjectBuilder<SubjectT extends Subject,ActualT>
In a fluent assertion chain, exposes the most common
that method, which accepts a value
under test and returns a Subject . |
static interface |
Subject.Factory<SubjectT extends Subject,ActualT>
|
Modifier and Type | Class and Description |
---|---|
class |
AtomicLongMapSubject
Deprecated.
Perform assertions on the
AtomicLongMap.asMap() view. |
class |
BigDecimalSubject
Propositions for
BigDecimal typed subjects. |
class |
BooleanSubject
Propositions for boolean subjects.
|
class |
ClassSubject
Propositions for
Class subjects. |
class |
ComparableSubject<T extends Comparable>
Propositions for
Comparable typed subjects. |
class |
DefaultSubject
Deprecated.
Use plain
Subject instead. At the moment, Subject has type
parameters, so you may wish to use Subject<?, ?> . However, those type parameters will
soon go away, so you may wish to start using raw Subject now to prepare. |
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 |
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 |
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,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,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,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 |
Truth.assertThat(Object actual) |
Subject |
StandardSubjectBuilder.that(Object actual) |
Modifier and Type | Class and Description |
---|---|
class |
IterableOfProtosSubject<M extends Message>
Truth subject for the iterables of protocol buffers.
|
class |
LiteProtoSubject
Truth subjects for the Lite version of Protocol Buffers.
|
class |
MapWithProtoValuesSubject<M extends Message>
Truth subject for maps with protocol buffers for values.
|
class |
MultimapWithProtoValuesSubject<M extends Message>
Truth subject for
Multimap s with protocol buffers for values. |
class |
ProtoSubject
Truth subject for the full version of Protocol Buffers.
|
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 © 2019. All rights reserved.