com.atlassian.pageobjects.elements.mock
Class MockCondition

java.lang.Object
  extended by com.atlassian.pageobjects.elements.query.AbstractPollingQuery
      extended by com.atlassian.pageobjects.elements.query.AbstractTimedQuery<Boolean>
          extended by com.atlassian.pageobjects.elements.query.AbstractTimedCondition
              extended by com.atlassian.pageobjects.elements.mock.MockCondition
All Implemented Interfaces:
PollingQuery, TimedCondition, TimedQuery<Boolean>, ClockAware

public class MockCondition
extends AbstractTimedCondition
implements TimedCondition

Mock implementation of TimedCondition.


Field Summary
static int DEFAULT_INTERVAL
           
static long DEFAULT_TIMEOUT
           
static TimedCondition FALSE
           
static TimedCondition TRUE
           
 
Fields inherited from class com.atlassian.pageobjects.elements.query.AbstractPollingQuery
defaultTimeout, interval
 
Constructor Summary
MockCondition(boolean... results)
           
MockCondition(Clock clock, long interval, boolean... results)
           
MockCondition(long interval, boolean... results)
           
 
Method Summary
 int callCount()
           
 Boolean currentValue()
           
static MockCondition successAfter(int falseCount)
           
 List<Long> times()
           
 String toString()
           
 MockCondition withClock(Clock clock)
           
 
Methods inherited from class com.atlassian.pageobjects.elements.query.AbstractTimedCondition
shouldReturn
 
Methods inherited from class com.atlassian.pageobjects.elements.query.AbstractTimedQuery
by, by, byDefaultTimeout, clock, expirationHandler, now, resetLastRun
 
Methods inherited from class com.atlassian.pageobjects.elements.query.AbstractPollingQuery
defaultTimeout, interval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.pageobjects.elements.query.TimedQuery
by, by, byDefaultTimeout, now
 
Methods inherited from interface com.atlassian.pageobjects.elements.query.PollingQuery
defaultTimeout, interval
 
Methods inherited from interface com.atlassian.pageobjects.elements.query.util.ClockAware
clock
 

Field Detail

TRUE

public static TimedCondition TRUE

FALSE

public static TimedCondition FALSE

DEFAULT_INTERVAL

public static final int DEFAULT_INTERVAL
See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

MockCondition

public MockCondition(Clock clock,
                     long interval,
                     boolean... results)

MockCondition

public MockCondition(long interval,
                     boolean... results)

MockCondition

public MockCondition(boolean... results)
Method Detail

successAfter

public static MockCondition successAfter(int falseCount)

withClock

public MockCondition withClock(Clock clock)

currentValue

public Boolean currentValue()
Specified by:
currentValue in class AbstractTimedQuery<Boolean>

callCount

public int callCount()

times

public List<Long> times()

toString

public String toString()
Overrides:
toString in class AbstractTimedQuery<Boolean>


Copyright © 2014 Atlassian. All rights reserved.