public class SpincastTestUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static IHandler<IDefaultRequestContext> |
dummyRouteHandler |
static String |
TEST_STRING |
static String |
TEST_STRING_LONG |
| Constructor and Description |
|---|
SpincastTestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
findFreePort()
Finds a free port.
|
static File |
generateTempClassFile(File writableDir) |
protected static InputStream |
getThisClassFileInputStream() |
static boolean |
waitForMaxSize(Collection<?> collection,
int maxSize)
This method checks frequently if the size of the specified collection
is under the speficied max size.
|
static boolean |
waitForMaxSize(Collection<?> collection,
int maxSize,
int maxMillisecToWait)
This method checks frequently if the size of the specified collection
is under the speficied max size.
|
static boolean |
waitForNumber(int[] oneIntArray,
int expected)
This method checks frequently if the number of the first element
of the specified int[] has reached the expected value.
|
static boolean |
waitForNumber(int[] oneIntArray,
int expected,
int maxMillisecToWait)
This method checks frequently if the number of the first element
of the specified int[] has reached the expected value.
|
static boolean |
waitForSize(Collection<?> collection,
int expected)
This method checks frequently if the size of the specified collection
has reached the expected size.
|
static boolean |
waitForSize(Collection<?> collection,
int expected,
int maxMillisecToWait)
This method checks frequently if the size of the specified collection
has reached the expected size.
|
static boolean |
waitForTrue(TrueChecker trueChecker)
Since Websockets are async, it's hard to wait for a
specific period of time before validating if an event
occured.
|
static boolean |
waitForTrue(TrueChecker trueChecker,
int maxMillisecToWait)
Since Websockets are async, it's hard to wait for a
specific period of time before validating if an event
occured.
|
protected static int |
waitForTrueLoopInterval() |
public static final String TEST_STRING
public static final String TEST_STRING_LONG
public static final IHandler<IDefaultRequestContext> dummyRouteHandler
protected static InputStream getThisClassFileInputStream()
public static int findFreePort()
public static boolean waitForTrue(TrueChecker trueChecker)
public static boolean waitForTrue(TrueChecker trueChecker, int maxMillisecToWait)
protected static int waitForTrueLoopInterval()
public static boolean waitForSize(Collection<?> collection, int expected)
public static boolean waitForSize(Collection<?> collection, int expected, int maxMillisecToWait)
public static boolean waitForMaxSize(Collection<?> collection, int maxSize)
public static boolean waitForMaxSize(Collection<?> collection, int maxSize, int maxMillisecToWait)
public static boolean waitForNumber(int[] oneIntArray,
int expected)
public static boolean waitForNumber(int[] oneIntArray,
int expected,
int maxMillisecToWait)
Copyright © 2016. All rights reserved.