public class AsyncAssert extends Object
Assert
which waits on Promise
argument before
calling correspondent Assert... function.
To avoid overload conflicts "WaitFor" postfix is used for methods that define varargs "waitFor" argument.
For example when AsyncAssert.assertEquals("expected", "expected",
waitForMe) is called Java resolves it to
void assertEquals(final String message, final Object expected, final Promise> actual)
when
void assertEquals(final Object expected, final Object actual, Promise>... waitFor)
was assumed.
Assert
Modifier and Type | Method and Description |
---|---|
static void |
assertArrayEquals(Object[] expected,
Promise<Object[]> actual) |
static void |
assertArrayEquals(String message,
Object[] expected,
Object[] actual,
Promise<?>... waitFor) |
static void |
assertArrayEquals(String message,
Object[] expected,
Promise<Object[]> actual) |
static void |
assertArrayEqualsWaitFor(Object[] expected,
Object[] actual,
Promise<?>... waitFor) |
static void |
assertEquals(double expected,
Promise<Double> actual,
double delta) |
static void |
assertEquals(Object expected,
Promise<?> actual) |
static void |
assertEquals(String message,
double expected,
Promise<Double> actual,
double delta) |
static void |
assertEquals(String message,
Object expected,
Promise<?> actual) |
static void |
assertEqualsWaitFor(double expected,
double actual,
double delta,
Promise<?>... waitFor) |
static void |
assertEqualsWaitFor(Object expected,
Object actual,
Promise<?>... waitFor) |
static void |
assertEqualsWaitFor(String message,
double expected,
double actual,
double delta,
Promise<?>... waitFor) |
static void |
assertEqualsWaitFor(String message,
Object expected,
Object actual,
Promise<?>... waitFor) |
static void |
assertFalse(Promise<Boolean> condition) |
static void |
assertFalse(String message,
Promise<Boolean> condition) |
static void |
assertFalseWaitFor(boolean condition,
Promise<?>... waitFor) |
static void |
assertFalseWaitFor(String message,
boolean condition,
Promise<?>... waitFor) |
static void |
assertNotNull(Promise<Object> object)
Asserts that an object its content isn't null.
|
static void |
assertNotNull(String message,
Promise<Object> object)
Asserts that an object Promise and its content isn't null.
|
static void |
assertNotNullWaitFor(Object object,
Promise<?>... waitFor) |
static void |
assertNotNullWaitFor(String message,
Object object,
Promise<?>... waitFor) |
static void |
assertNotReady(Promise<?> condition) |
static void |
assertNotReady(String message,
Promise<?> condition) |
static void |
assertNotSame(Object expected,
Promise<Object> actual)
Asserts that two Promises content do not refer to the same object.
|
static void |
assertNotSame(String message,
Object expected,
Promise<Object> actual)
Asserts that two Promises content do not refer to the same object.
|
static void |
assertNotSameWaitFor(Object expected,
Object actual,
Promise<?>... waitFor) |
static void |
assertNotSameWaitFor(String message,
Object expected,
Object actual,
Promise<?>... waitFor) |
static void |
assertNull(Promise<Object> object)
Asserts that an object is not
null while
object.get() is null . |
static void |
assertNull(String message,
Promise<Object> object)
Asserts that an object is not
null while
object.get() is null . |
static void |
assertNullWaitFor(Object object,
Promise<?>... waitFor) |
static void |
assertNullWaitFor(String message,
Object object,
Promise<?>... waitFor) |
static void |
assertReady(Promise<?> condition) |
static void |
assertReady(String message,
Promise<?> condition) |
static void |
assertSame(Object expected,
Promise<Object> actual)
Asserts that two Promises content refer to the same object.
|
static void |
assertSame(String message,
Object expected,
Promise<Object> actual)
Asserts that two Promises content refer to the same object.
|
static void |
assertSameWaitFor(Object expected,
Object actual,
Promise<?>... waitFor) |
static void |
assertSameWaitFor(String message,
Object expected,
Object actual,
Promise<?>... waitFor) |
static void |
assertTrue(Promise<Boolean> condition) |
static void |
assertTrue(String message,
Promise<Boolean> condition) |
static void |
assertTrueWaitFor(boolean condition,
Promise<?>... waitFor) |
static void |
assertTrueWaitFor(String message,
boolean condition,
Promise<?>... waitFor) |
public static void assertReady(Promise<?> condition)
public static void assertNotReady(Promise<?> condition)
public static void assertTrueWaitFor(String message, boolean condition, Promise<?>... waitFor)
public static void assertTrueWaitFor(boolean condition, Promise<?>... waitFor)
public static void assertFalseWaitFor(String message, boolean condition, Promise<?>... waitFor)
public static void assertFalseWaitFor(boolean condition, Promise<?>... waitFor)
public static void assertEqualsWaitFor(String message, Object expected, Object actual, Promise<?>... waitFor)
public static void assertEqualsWaitFor(Object expected, Object actual, Promise<?>... waitFor)
public static void assertArrayEquals(String message, Object[] expected, Object[] actual, Promise<?>... waitFor)
public static void assertArrayEquals(String message, Object[] expected, Promise<Object[]> actual)
public static void assertArrayEqualsWaitFor(Object[] expected, Object[] actual, Promise<?>... waitFor)
public static void assertEqualsWaitFor(String message, double expected, double actual, double delta, Promise<?>... waitFor)
public static void assertEquals(String message, double expected, Promise<Double> actual, double delta)
public static void assertEqualsWaitFor(double expected, double actual, double delta, Promise<?>... waitFor)
public static void assertNotNullWaitFor(String message, Object object, Promise<?>... waitFor)
public static void assertNotNull(String message, Promise<Object> object)
AssertionError
is thrown with the given message.message
- the identifying message for the AssertionError
(
null
okay)object
- Object to check or null
public static void assertNotNull(Promise<Object> object)
public static void assertNullWaitFor(String message, Object object, Promise<?>... waitFor)
public static void assertNull(String message, Promise<Object> object)
null
while
object.get()
is null
.public static void assertNull(Promise<Object> object)
null
while
object.get()
is null
.public static void assertSameWaitFor(String message, Object expected, Object actual, Promise<?>... waitFor)
public static void assertSame(String message, Object expected, Promise<Object> actual)
AssertionError
is thrown with the given message.public static void assertSameWaitFor(Object expected, Object actual, Promise<?>... waitFor)
public static void assertSame(Object expected, Promise<Object> actual)
AssertionError
is thrown with the given message.public static void assertNotSameWaitFor(String message, Object expected, Object actual, Promise<?>... waitFor)
public static void assertNotSame(String message, Object expected, Promise<Object> actual)
AssertionError
is thrown with the given message.public static void assertNotSameWaitFor(Object expected, Object actual, Promise<?>... waitFor)
public static void assertNotSame(Object expected, Promise<Object> actual)
AssertionError
is thrown with the given message.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.