Package | Description |
---|---|
com.google.common.truth |
Truth is an open source, fluent testing framework for Java that is designed to make your test
assertions and failure messages more readable.
|
Modifier and Type | Class and Description |
---|---|
class |
Expect
A
TestRule that batches up all failures encountered during a test, and reports them all
together at the end. |
Modifier and Type | Method and Description |
---|---|
static StandardSubjectBuilder |
Truth.assert_()
Begins a call chain with the fluent Truth API.
|
static StandardSubjectBuilder |
Truth.assertWithMessage(String messageToPrepend)
Returns a
TestVerb that will prepend the given message to the failure message in the
event of a test failure. |
static StandardSubjectBuilder |
Truth.assertWithMessage(String format,
Object... args)
Returns a
TestVerb that will prepend the formatted message using the specified
arguments to the failure message in the event of a test failure. |
static StandardSubjectBuilder |
TruthJUnit.assume()
Begins a call chain with the fluent Truth API.
|
protected StandardSubjectBuilder |
Subject.check()
A convenience for implementers of
Subject subclasses to use other truth Subject
wrappers within their own propositional logic. |
static StandardSubjectBuilder |
StandardSubjectBuilder.forCustomFailureStrategy(FailureStrategy failureStrategy)
Returns a new instance that invokes the given
FailureStrategy when a check fails. |
protected StandardSubjectBuilder |
Subject.ignoreCheck()
A convenience for implementers of
Subject subclasses that use other truth Subject wrappers within their own propositional logic and sometimes need to
short-circuit those subjects because the assertion chain has already failed. |
StandardSubjectBuilder |
ExpectFailure.whenTesting()
Returns a test verb that expects the chained assertion to fail, and makes the failure available
via
ExpectFailure.getFailure() . |
StandardSubjectBuilder |
StandardSubjectBuilder.withMessage(String messageToPrepend) |
StandardSubjectBuilder |
StandardSubjectBuilder.withMessage(String format,
Object... args)
Returns a
StandardSubjectBuilder that will prepend the formatted message using the
specified arguments to the failure message in the event of a test failure. |
Modifier and Type | Method and Description |
---|---|
void |
ExpectFailure.StandardSubjectBuilderCallback.invokeAssertion(StandardSubjectBuilder whenTesting) |
Copyright © 2017. All rights reserved.