Package com.google.common.truth
Class Truth8
- java.lang.Object
-
- com.google.common.truth.Truth8
-
public final class Truth8 extends Object
The primary entry point for assertions about Java 8 types.To use
Truth.assertWithMessage(java.lang.String)with a Java 8 type, useassertWithMessage(...).about(optionals()).that(...)(or similarly for the other types).Likewise, to use different failure strategies like
Expect, useexpect.about(optionals()).that(...).For more information about combining different messages, failure strategies, and subjects, see How do I specify a custom message/failure behavior/
Subjecttype? in the Truth FAQ.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PathSubjectassertThat(@Nullable Path target)static OptionalSubjectassertThat(@Nullable Optional<?> target)static OptionalDoubleSubjectassertThat(@Nullable OptionalDouble target)static OptionalIntSubjectassertThat(@Nullable OptionalInt target)static OptionalLongSubjectassertThat(@Nullable OptionalLong target)static IntStreamSubjectassertThat(@Nullable java.util.stream.IntStream target)static LongStreamSubjectassertThat(@Nullable java.util.stream.LongStream target)static StreamSubjectassertThat(@Nullable java.util.stream.Stream<?> target)
-
-
-
Method Detail
-
assertThat
public static OptionalSubject assertThat(@Nullable Optional<?> target)
-
assertThat
public static OptionalIntSubject assertThat(@Nullable OptionalInt target)
-
assertThat
public static OptionalLongSubject assertThat(@Nullable OptionalLong target)
-
assertThat
public static OptionalDoubleSubject assertThat(@Nullable OptionalDouble target)
-
assertThat
public static StreamSubject assertThat(@Nullable java.util.stream.Stream<?> target)
-
assertThat
public static IntStreamSubject assertThat(@Nullable java.util.stream.IntStream target)
-
assertThat
public static LongStreamSubject assertThat(@Nullable java.util.stream.LongStream target)
-
assertThat
@GwtIncompatible public static PathSubject assertThat(@Nullable Path target)
-
-