com.atlassian.jira.util
Class StrictMockClock

java.lang.Object
  extended by com.atlassian.jira.util.StrictMockClock
All Implemented Interfaces:
com.atlassian.core.util.Clock

public class StrictMockClock
extends Object
implements com.atlassian.core.util.Clock

A mock Clock that will return predefined dates and will throws exception, if called more times than the number of predefined values.

Since:
v4.3

Constructor Summary
StrictMockClock(List<Long> times)
           
StrictMockClock(Long... times)
           
 
Method Summary
 long first()
           
 Date getCurrentDate()
           
 long last()
           
 List<Long> times()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrictMockClock

public StrictMockClock(List<Long> times)

StrictMockClock

public StrictMockClock(Long... times)
Method Detail

times

public List<Long> times()

first

public long first()

last

public long last()

getCurrentDate

public Date getCurrentDate()
Specified by:
getCurrentDate in interface com.atlassian.core.util.Clock


Copyright © 2002-2014 Atlassian. All Rights Reserved.