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 int
A_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)
void
evaluateFor(Actor actor)
static <T> EventualConsequence<T>
eventually(Consequence<T> consequenceThatMightTakeSomeTime)
Consequence<T>
ignoringExceptions(java.lang.Class<? extends java.lang.Throwable>... exceptionsToIgnore)
boolean
isSilent()
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 void
performSetupActionsAs(Actor actor)
java.lang.String
toString()
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:
evaluateFor
in interfaceConsequence<T>
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
orComplainWith
- Specified by:
orComplainWith
in 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:
orComplainWith
in interfaceConsequence<T>
-
whenAttemptingTo
- Specified by:
whenAttemptingTo
in interfaceConsequence<T>
-
because
- Specified by:
because
in interfaceConsequence<T>
-
isSilent
public boolean isSilent()- Specified by:
isSilent
in interfaceCanBeSilent
-
withNoReporting
-
after
Description copied from interface:Consequence
Evaluate the consequence only after performing the specified tasks.- Specified by:
after
in interfaceConsequence<T>
-
performSetupActionsAs
-