AbstractVerb, subclass CustomSubjectBuilder.
CustomSubjectBuilder is the new way of defining custom that() methods, and it
doesn't require you to write boilerplate to store and propagate the failure message.@Deprecated public abstract class AbstractVerb<T extends AbstractVerb<T>> extends FailureContext
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractVerb.DelegatedVerb<S extends Subject<S,T>,T>
Deprecated.
This class is being renamed to
SimpleSubjectBuilder. |
protected static class |
AbstractVerb.MessagePrependingFailureStrategy
Deprecated.
To prepend a message, use
StandardSubjectBuilder.withMessage(java.lang.String). If you are
using MessagePrependingFailureStrategy to store and propagate the failure message
as part of subclassing AbstractVerb or TestVerb, you will no longer need it
when you migrate off those classes, as described in their deprecation text. |
| Constructor and Description |
|---|
AbstractVerb(FailureStrategy failureStrategy)
Deprecated.
|
AbstractVerb(FailureStrategy failureStrategy,
String format,
Object... args)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
<V extends AbstractDelegatedVerb> |
about(DelegatedVerbFactory<V> factory)
Deprecated.
When you switch from implementing
DelegatedVerbFactory to implementing
CustomSubjectBuilderFactory, you'll switch from this overload to the overload that accepts a CustomSubjectBuilderFactory. |
<S extends Subject<S,D>,D,SF extends SubjectFactory<S,D>> |
about(SF factory)
Deprecated.
The recommended method of extension of Truth to new types, which is documented in
com.google.common.truth.delegation.DelegationTest. |
void |
fail()
Deprecated.
Triggers the failure strategy with an empty failure message
|
void |
fail(String format,
Object... args)
Deprecated.
Triggers the failure strategy with the given failure message
|
protected FailureStrategy |
getFailureStrategy()
Deprecated.
|
abstract T |
withMessage(String messageToPrepend)
Deprecated.
Overrides the failure message of the subsequent subject's propositions.
|
abstract T |
withMessage(String format,
Object... args)
Deprecated.
Overrides the failure message of the subsequent subject's propositions.
|
getFailureMessage, hasFailureMessagepublic AbstractVerb(FailureStrategy failureStrategy)
public AbstractVerb(FailureStrategy failureStrategy, @Nullable String format, Object... args)
protected FailureStrategy getFailureStrategy()
public void fail()
public void fail(@Nullable String format, Object... args)
public abstract T withMessage(@Nullable String messageToPrepend)
messageToPrepend - a descriptive message.com.google.common.truth.delegation.DelegationTestpublic abstract T withMessage(@Nullable String format, Object... args)
format - a descriptive message with formatting template content.args - object parameters to be substituted into the message template.com.google.common.truth.delegation.DelegationTestpublic <S extends Subject<S,D>,D,SF extends SubjectFactory<S,D>> AbstractVerb.DelegatedVerb<S,D> about(SF factory)
com.google.common.truth.delegation.DelegationTest.factory - a SubjectFactory<S, D> implementationcom.google.common.truth.delegation.DelegationTest@Deprecated public final <V extends AbstractDelegatedVerb> V about(DelegatedVerbFactory<V> factory)
DelegatedVerbFactory to implementing
CustomSubjectBuilderFactory, you'll switch from this overload to the overload that accepts a CustomSubjectBuilderFactory.DelegatedVerbFactory. Extension creators should prefer SubjectFactory if possible.V - the type of AbstractDelegatedVerb to returnfactory - a DelegatedVerbFactory<V> implementation<V>Copyright © 2017. All rights reserved.