com.atlassian.jira.webtest.framework.gadget
Class GadgetTimedCondition

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.core.context.AbstractWebTestContextAware
      extended by com.atlassian.jira.webtest.framework.gadget.GadgetTimedCondition
All Implemented Interfaces:
TimedCondition, WebTestContextAware, PollingQuery

public class GadgetTimedCondition
extends AbstractWebTestContextAware
implements TimedCondition

TimedCondition that decorates another target condition and changes target frame of its calls to hit the target gadget.

Since:
v4.3

Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.core.context.AbstractWebTestContextAware
context
 
Constructor Summary
GadgetTimedCondition(WebTestContext context, TimedCondition condition, Gadget gadget)
           
 
Method Summary
 boolean by(long timeout)
          Evaluate the condition by given timeout.
 boolean byDefaultTimeout()
          Evaluate the condition by a timeout deemed default by the condition in the given test context.
 long defaultTimeout()
          Default timeout of this query in the current test context.
 long interval()
          An interval (in milliseconds) that will be used to periodically evaluate the query.
 boolean now()
          Evaluate the condition immediately.
 String toString()
           
 
Methods inherited from class com.atlassian.jira.webtest.framework.core.context.AbstractWebTestContextAware
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GadgetTimedCondition

public GadgetTimedCondition(WebTestContext context,
                            TimedCondition condition,
                            Gadget gadget)
Method Detail

by

public boolean by(long timeout)
Description copied from interface: TimedCondition
Evaluate the condition by given timeout. That is, return true as soon as the condition is true, otherwise return false when the given timeout expires.

Specified by:
by in interface TimedCondition
Parameters:
timeout - timeout in milliseconds (must be greater than 0)
Returns:
true, if the underlying condition evaluates to true before the timeout expires

byDefaultTimeout

public boolean byDefaultTimeout()
Description copied from interface: TimedCondition
Evaluate the condition by a timeout deemed default by the condition in the given test context.

Specified by:
byDefaultTimeout in interface TimedCondition
Returns:
true, if the underlying condition evaluates to true before the default timeout expires

now

public boolean now()
Description copied from interface: TimedCondition
Evaluate the condition immediately.

Specified by:
now in interface TimedCondition
Returns:
current evaluation of the underlying condition.

interval

public long interval()
Description copied from interface: PollingQuery
An interval (in milliseconds) that will be used to periodically evaluate the query.

Specified by:
interval in interface PollingQuery
Returns:
evaluation interval of this query.

defaultTimeout

public long defaultTimeout()
Description copied from interface: PollingQuery
Default timeout of this query in the current test context.

Specified by:
defaultTimeout in interface PollingQuery
Returns:
default timeout of this query

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2013 Atlassian. All Rights Reserved.