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(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)
-
-
-
Method Detail
-
assertThat
public static OptionalSubject assertThat(@NullableDecl Optional<?> target)
-
assertThat
public static OptionalIntSubject assertThat(@NullableDecl OptionalInt target)
-
assertThat
public static OptionalLongSubject assertThat(@NullableDecl OptionalLong target)
-
assertThat
public static OptionalDoubleSubject assertThat(@NullableDecl OptionalDouble target)
-
assertThat
public static StreamSubject assertThat(@NullableDecl Stream<?> target)
-
assertThat
public static IntStreamSubject assertThat(@NullableDecl IntStream target)
-
assertThat
public static LongStreamSubject assertThat(@NullableDecl LongStream target)
-
assertThat
@GwtIncompatible public static PathSubject assertThat(@NullableDecl Path target)
-
-