Package net.serenitybdd.screenplay
Class EventualConsequence<T>
java.lang.Object
net.serenitybdd.screenplay.EventualConsequence<T>
- All Implemented Interfaces:
CanBeSilent,Consequence<T>
public class EventualConsequence<T> extends java.lang.Object implements Consequence<T>, CanBeSilent
-
Field Summary
Fields Modifier and Type Field Description static intA_SHORT_PERIOD_BETWEEN_TRIES -
Constructor Summary
Constructors Constructor Description EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime)EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime, long timeoutInMilliseconds)EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime, long timeoutInMilliseconds, boolean isSilent) -
Method Summary
Modifier and Type Method Description Consequence<T>after(Performable... actions)Evaluate the consequence only after performing the specified tasks.Consequence<T>because(java.lang.String explanation)voidevaluateFor(Actor actor)static <T> EventualConsequence<T>eventually(Consequence<T> consequenceThatMightTakeSomeTime)Consequence<T>ignoringExceptions(java.lang.Class<? extends java.lang.Throwable>... exceptionsToIgnore)booleanisSilent()Consequence<T>orComplainWith(java.lang.Class<? extends java.lang.Error> complaintType)Consequence<T>orComplainWith(java.lang.Class<? extends java.lang.Error> complaintType, java.lang.String complaintDetails)protected voidperformSetupActionsAs(Actor actor)java.lang.StringtoString()EventualConsequenceBuilder<T>waitingForNoLongerThan(long amount)Consequence<T>whenAttemptingTo(Performable performable)EventualConsequence<T>withNoReporting()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
A_SHORT_PERIOD_BETWEEN_TRIES
public static final int A_SHORT_PERIOD_BETWEEN_TRIES- See Also:
- Constant Field Values
-
-
Constructor Details
-
EventualConsequence
public EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime, long timeoutInMilliseconds) -
EventualConsequence
public EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime, long timeoutInMilliseconds, boolean isSilent) -
EventualConsequence
-
-
Method Details
-
eventually
public static <T> EventualConsequence<T> eventually(Consequence<T> consequenceThatMightTakeSomeTime) -
waitingForNoLongerThan
-
evaluateFor
- Specified by:
evaluateForin interfaceConsequence<T>
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
orComplainWith
- Specified by:
orComplainWithin interfaceConsequence<T>
-
ignoringExceptions
public Consequence<T> ignoringExceptions(java.lang.Class<? extends java.lang.Throwable>... exceptionsToIgnore) -
orComplainWith
public Consequence<T> orComplainWith(java.lang.Class<? extends java.lang.Error> complaintType, java.lang.String complaintDetails)- Specified by:
orComplainWithin interfaceConsequence<T>
-
whenAttemptingTo
- Specified by:
whenAttemptingToin interfaceConsequence<T>
-
because
- Specified by:
becausein interfaceConsequence<T>
-
isSilent
public boolean isSilent()- Specified by:
isSilentin interfaceCanBeSilent
-
withNoReporting
-
after
Description copied from interface:ConsequenceEvaluate the consequence only after performing the specified tasks.- Specified by:
afterin interfaceConsequence<T>
-
performSetupActionsAs
-