public final class Truth8 extends Object
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.
Modifier and Type | Method and Description |
---|---|
static IntStreamSubject |
assertThat(java.util.stream.IntStream target) |
static LongStreamSubject |
assertThat(java.util.stream.LongStream target) |
static OptionalSubject |
assertThat(Optional<?> target) |
static OptionalDoubleSubject |
assertThat(OptionalDouble target) |
static OptionalIntSubject |
assertThat(OptionalInt target) |
static OptionalLongSubject |
assertThat(OptionalLong target) |
static PathSubject |
assertThat(Path target) |
static StreamSubject |
assertThat(java.util.stream.Stream<?> target) |
public static OptionalSubject assertThat(@NullableDecl Optional<?> target)
public static OptionalIntSubject assertThat(@NullableDecl OptionalInt target)
public static OptionalLongSubject assertThat(@NullableDecl OptionalLong target)
public static OptionalDoubleSubject assertThat(@NullableDecl OptionalDouble target)
public static StreamSubject assertThat(@NullableDecl java.util.stream.Stream<?> target)
public static IntStreamSubject assertThat(@NullableDecl java.util.stream.IntStream target)
public static LongStreamSubject assertThat(@NullableDecl java.util.stream.LongStream target)
@GwtIncompatible public static PathSubject assertThat(@NullableDecl Path target)
Copyright © 2019. All rights reserved.