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 PathSubjectassertThat(Path target) static OptionalSubjectassertThat(Optional<?> target) static OptionalDoubleSubjectassertThat(OptionalDouble target) static OptionalIntSubjectassertThat(OptionalInt target) static OptionalLongSubjectassertThat(OptionalLong target) static IntStreamSubjectassertThat(IntStream target) static LongStreamSubjectassertThat(LongStream target) static StreamSubjectassertThat(Stream<?> target)
-
Constructor Details
-
Truth8
private Truth8()
-
-
Method Details
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-
assertThat
-