/** * fails every time; same as assertTrue(false) * * @throws WebApplicationException with status code 422 (Unprocessable Entity) */ public static void fail() { RESTAssert.fail(RESTAssert.DEFAULT_STATUS_CODE); }
/** * returns if condition evaluates to false and throws {@link WebApplicationException} if it evaluates to true * * @param condition the condition to assert * @param status the status code to throw * @throws WebApplicationException with given status code if condition is <i>true</i> */ public static void assertFalse(final boolean condition, final StatusType status) { if (condition) { RESTAssert.fail(status); } }