Uses of Class
com.google.common.truth.StandardSubjectBuilder
-
Uses of StandardSubjectBuilder in com.google.common.truth
Subclasses of StandardSubjectBuilder in com.google.common.truthModifier and TypeClassDescriptionfinal class
ATestRule
that batches up all failures encountered during a test, and reports them all together at the end (similar toErrorCollector
).Fields in com.google.common.truth declared as StandardSubjectBuilderModifier and TypeFieldDescriptionprivate static final StandardSubjectBuilder
Truth.ASSERT
private static final StandardSubjectBuilder
TruthJUnit.ASSUME
Methods in com.google.common.truth that return StandardSubjectBuilderModifier and TypeMethodDescriptionstatic StandardSubjectBuilder
Truth.assert_()
Begins a call chain with the fluent Truth API.static StandardSubjectBuilder
Truth.assertWithMessage
(String messageToPrepend) Begins an assertion that, if it fails, will prepend the given message to the failure message.static StandardSubjectBuilder
Truth.assertWithMessage
(String format, Object... args) Begins an assertion that, if it fails, will prepend the given message to the failure message.static final StandardSubjectBuilder
TruthJUnit.assume()
Begins a call chain with the fluent Truth API.(package private) final StandardSubjectBuilder
Subject.check()
Deprecated.Use the other overload, which requires you to supply more information to include in any failure messages.protected final StandardSubjectBuilder
Returns a builder for creating a derived subject.(package private) final StandardSubjectBuilder
Subject.checkNoNeedToDisplayBothValues
(String format, Object... args) private StandardSubjectBuilder
Subject.doCheck
(FailureMetadata.OldAndNewValuesAreSimilar valuesAreSimilar, String format, Object[] args) static StandardSubjectBuilder
StandardSubjectBuilder.forCustomFailureStrategy
(FailureStrategy failureStrategy) Returns a new instance that invokes the givenFailureStrategy
when a check fails.protected final StandardSubjectBuilder
Subject.ignoreCheck()
Begins a new call chain that ignores any failures.ExpectFailure.whenTesting()
Returns a test verb that expects the chained assertion to fail, and makes the failure available viaExpectFailure.getFailure()
.final StandardSubjectBuilder
StandardSubjectBuilder.withMessage
(String messageToPrepend) Returns a new instance that will output the given message before the main failure message.final StandardSubjectBuilder
StandardSubjectBuilder.withMessage
(String format, Object... args) Returns a new instance that will output the given message before the main failure message.Methods in com.google.common.truth with parameters of type StandardSubjectBuilderModifier and TypeMethodDescriptionvoid
ExpectFailure.StandardSubjectBuilderCallback.invokeAssertion
(StandardSubjectBuilder whenTesting)