@GwtIncompatible(value="JUnit4") public final class TruthJUnit extends Object
For example:
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.TruthJUnit.assume;
public void @Test testFoosAgainstBars {
assume().that(foo).isNotNull();
assume().that(bar).isNotNull();
assertThat(foo.times(bar)).isEqualTo(blah);
}
| Modifier and Type | Method and Description |
|---|---|
static StandardSubjectBuilder |
assume()
Begins a call chain with the fluent Truth API.
|
static FailureStrategy |
throwAssumptionError()
Deprecated.
If you are passing this to a
Subject constructor, instead call assume().about(...).that(...), passing its associated SubjectFactory
(which you might need to create). If you are calling fail on this object directly,
instead use assume().fail(), or throw new
AssumptionViolatedException() directly. |
@Deprecated public static final FailureStrategy throwAssumptionError()
Subject constructor, instead call assume().about(...).that(...), passing its associated SubjectFactory
(which you might need to create). If you are calling fail on this object directly,
instead use assume().fail(), or throw new
AssumptionViolatedException() directly.public static final StandardSubjectBuilder assume()
AssumptionViolatedException.Copyright © 2017. All rights reserved.