Class MockSleeper (1.45.3)

public class MockSleeper implements Sleeper

Beta
Mock for Sleeper.

Implementation is not thread-safe.

Inheritance

java.lang.Object > MockSleeper

Implements

Sleeper

Constructors

MockSleeper()

public MockSleeper()

Methods

getCount()

public final int getCount()

Returns the number of times #sleep(long) was called.

Returns
Type Description
int

getLastMillis()

public final long getLastMillis()

Returns the value of millis parameter when #sleep(long) was last called or 0 if not called.

Returns
Type Description
long

sleep(long millis)

public void sleep(long millis)

Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds as specified in Thread#sleep(long).

Parameter
Name Description
millis long
Exceptions
Type Description
InterruptedException