com.google.common.truth
Class AbstractVerb<T extends AbstractVerb<T>>

java.lang.Object
  extended by com.google.common.truth.AbstractVerb<T>
Direct Known Subclasses:
TestVerb

public abstract class AbstractVerb<T extends AbstractVerb<T>>
extends Object


Nested Class Summary
static class AbstractVerb.DelegatedVerb<S extends Subject<S,T>,T>
          A special Verb implementation which wraps a SubjectFactory
protected static class AbstractVerb.MessageOverridingFailureStrategy
           
 
Constructor Summary
AbstractVerb(FailureStrategy failureStrategy)
           
 
Method Summary
<S extends Subject<S,T>,T,SF extends SubjectFactory<S,T>>
AbstractVerb.DelegatedVerb<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()
           
<T> IteratingVerb<T>
in(Iterable<T> data)
           
abstract  T withFailureMessage(String failureMessage)
          Overrides the failure message of the subsequent subject's propositions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVerb

public AbstractVerb(FailureStrategy failureStrategy)
Method Detail

getFailureStrategy

protected FailureStrategy getFailureStrategy()

fail

public void fail()
Triggers the failure strategy with an empty failure message


fail

public void fail(String format,
                 Object... args)
Triggers the failure strategy with the given failure message


withFailureMessage

@CheckReturnValue
public abstract T withFailureMessage(String failureMessage)
Overrides the failure message of the subsequent subject's propositions.

Parameters:
factory - a SubjectFactory implementation
See Also:
com.google.common.truth.delegation.DelegationTest

getFailureMessage

protected abstract String getFailureMessage()

about

public <S extends Subject<S,T>,T,SF extends SubjectFactory<S,T>> AbstractVerb.DelegatedVerb<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 .

Parameters:
factory - a SubjectFactory implementation
See Also:
com.google.common.truth.delegation.DelegationTest

in

@GwtIncompatible(value="org.truth0.IteratingVerb")
public <T> IteratingVerb<T> in(Iterable<T> data)


Copyright © 2014. All rights reserved.