Package com.google.common.truth
Class Truth8
java.lang.Object
com.google.common.truth.Truth8
The primary entry point for assertions about Java 8 types.
To use Truth.assertWithMessage(java.lang.String)
with a Java 8 type, use
assertWithMessage(...).about(
optionals()
).that(...)
(or similarly for the other types).
Likewise, to use different failure strategies like Expect
, use
expect.about(
optionals()
).that(...)
.
For more information about combining different messages, failure strategies, and subjects, see
How do I specify a custom message/failure
behavior/Subject
type? in the Truth FAQ.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathSubject
assertThat
(Path target) static OptionalSubject
assertThat
(Optional<?> target) static OptionalDoubleSubject
assertThat
(OptionalDouble target) static OptionalIntSubject
assertThat
(OptionalInt target) static OptionalLongSubject
assertThat
(OptionalLong target) static IntStreamSubject
assertThat
(IntStream target) static LongStreamSubject
assertThat
(LongStream target) static StreamSubject
assertThat
(Stream<?> target)
-
Constructor Details
-
Truth8
private Truth8()
-
-
Method Details
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-