public class RESTAssert extends Object
WebApplicationException on failure| Constructor and Description |
|---|
RESTAssert() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEquals(Object one,
Object two)
assert that objects are equal.
This means they are both null or one.equals(two) returns true |
static void |
assertEquals(Object one,
Object two,
javax.ws.rs.core.Response.Status status)
assert that objects are equal.
This means they are both null or one.equals(two) returns true |
static void |
assertFalse(boolean condition)
returns if condition evaluates to false and throws
WebApplicationException(412) if it evaluates to true |
static void |
assertFalse(boolean condition,
javax.ws.rs.core.Response.Status status)
returns if condition evaluates to false and throws
WebApplicationException if it evaluates to true |
static void |
assertNotEmpty(Collection<?> collection)
assert that collection is not empty
|
static void |
assertNotEmpty(Collection<?> collection,
javax.ws.rs.core.Response.Status status)
assert that collection is not empty
|
static void |
assertNotEmpty(String string)
assert that string is not null nor empty
|
static void |
assertNotEmpty(String string,
javax.ws.rs.core.Response.Status status)
assert that string is not null nor empty
|
static void |
assertNotNull(Object object)
assert that object is not null
|
static void |
assertNotNull(Object object,
javax.ws.rs.core.Response.Status status)
assert that object is not null
|
static void |
assertSingleElement(Collection<?> collection)
assert that collection has one element
|
static void |
assertSingleElement(Collection<?> collection,
javax.ws.rs.core.Response.Status status)
assert that collection has one element
|
static void |
assertTrue(boolean condition)
returns if condition evaluates to true and throws
WebApplicationException(412) if it evaluates to false |
static void |
assertTrue(boolean condition,
javax.ws.rs.core.Response.Status status)
returns if condition evaluates to true and throws
WebApplicationException if it evaluates to false |
public static void assertTrue(boolean condition)
WebApplicationException(412) if it evaluates to falsecondition - the condition to assertjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed) if condition is falsepublic static void assertTrue(boolean condition,
javax.ws.rs.core.Response.Status status)
WebApplicationException if it evaluates to falsecondition - the condition to assertstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status code if condition is falsepublic static void assertFalse(boolean condition)
WebApplicationException(412) if it evaluates to truecondition - the condition to assertjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed) if condition is truepublic static void assertFalse(boolean condition,
javax.ws.rs.core.Response.Status status)
WebApplicationException if it evaluates to truecondition - the condition to assertstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status code if condition is truepublic static void assertNotNull(Object object)
object - the object to checkjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed)public static void assertNotNull(Object object, javax.ws.rs.core.Response.Status status)
object - the object to checkstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status codepublic static void assertNotEmpty(String string)
string - the string to checkjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed)public static void assertNotEmpty(String string, javax.ws.rs.core.Response.Status status)
string - the string to checkstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status codepublic static void assertNotEmpty(Collection<?> collection)
collection - the collection to checkjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed)public static void assertNotEmpty(Collection<?> collection, javax.ws.rs.core.Response.Status status)
collection - the collection to checkstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status codepublic static void assertSingleElement(Collection<?> collection)
collection - the collection to checkjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed)public static void assertSingleElement(Collection<?> collection, javax.ws.rs.core.Response.Status status)
collection - the collection to checkstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status codepublic static void assertEquals(Object one, Object two)
one.equals(two) returns trueone - the first objecttwo - the second objectjavax.ws.rs.WebApplicationException - with status code 412 (Precondition failed)public static void assertEquals(Object one, Object two, javax.ws.rs.core.Response.Status status)
one.equals(two) returns trueone - the first objecttwo - the second objectstatus - the status code to throwjavax.ws.rs.WebApplicationException - with given status codeCopyright © 2011-2012 Taimos GmbH. All Rights Reserved.