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>
A special Verb implementation which wraps a SubjectFactory 
 | 
protected static class  | 
AbstractVerb.MessagePrependingFailureStrategy  | 
| Constructor and Description | 
|---|
AbstractVerb(FailureStrategy failureStrategy)  | 
AbstractVerb(FailureStrategy failureStrategy,
            String format,
            Object... args)  | 
| Modifier and Type | Method and Description | 
|---|---|
<V extends AbstractDelegatedVerb<V>> | 
about(DelegatedVerbFactory<V> factory)
A generic, advanced method of extension of Truth to new types, which is documented on  
DelegatedVerbFactory. | 
<S extends Subject<S,D>,D,SF extends SubjectFactory<S,D>> | 
about(SF factory)
The recommended method of extension of Truth to new types, which is documented in  
com.google.common.truth.delegation.DelegationTest. | 
void | 
fail()
Triggers the failure strategy with an empty failure message 
 | 
void | 
fail(String format,
    Object... args)
Triggers the failure strategy with the given failure message 
 | 
protected FailureStrategy | 
getFailureStrategy()  | 
abstract T | 
withFailureMessage(String failureMessage)
Deprecated. 
 
Use  
withMessage, the new name of this method. | 
abstract T | 
withFailureMessage(String format,
                  Object... args)
Deprecated. 
 
Use  
withMessage, the new name of this method. | 
abstract T | 
withMessage(String messageToPrepend)
Overrides the failure message of the subsequent subject's propositions. 
 | 
abstract T | 
withMessage(String format,
           Object... args)
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 final void fail()
public final void fail(@Nullable String format, Object... args)
@Deprecated public abstract T withFailureMessage(@Nullable String failureMessage)
withMessage, the new name of this method.failureMessage - a descriptive message.com.google.common.truth.delegation.DelegationTest@Deprecated public abstract T withFailureMessage(@Nullable String format, Object... args)
withMessage, the new name of this method.format - a descriptive message with formatting template content.args - object parameters to be substituted into the message template.com.google.common.truth.delegation.DelegationTestpublic 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 final <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.DelegationTestpublic final <V extends AbstractDelegatedVerb<V>> V about(DelegatedVerbFactory<V> factory)
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.