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) |
Modifier and Type | Method and Description |
---|---|
<S extends Subject<S,T>,T,SF extends SubjectFactory<S,T>> |
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 abstract String |
getFailureMessage() |
protected FailureStrategy |
getFailureStrategy() |
protected boolean |
hasFailureMessage() |
abstract T |
withFailureMessage(String failureMessage)
Overrides the failure message of the subsequent subject's propositions.
|
public AbstractVerb(FailureStrategy failureStrategy)
protected FailureStrategy getFailureStrategy()
public void fail()
public void fail(@Nullable String format, Object... args)
@CheckReturnValue public abstract T withFailureMessage(@Nullable String failureMessage)
failureMessage
- a descriptive message. null
to remove any current message.com.google.common.truth.delegation.DelegationTest
protected boolean hasFailureMessage()
public <S extends Subject<S,T>,T,SF extends SubjectFactory<S,T>> AbstractVerb.DelegatedVerb<S,T> about(SF factory)
com.google.common.truth.delegation.DelegationTest
.factory
- a SubjectFactorycom.google.common.truth.delegation.DelegationTest
Copyright © 2015. All Rights Reserved.