List of utility methods to do Assert Null
void | assertNull(Object obj) assert Null assertNull(obj, "[Assertion failed] - This object argument must be null.");
|
void | assertNull(Object object) Check that object is null. if (object != null) { throw new IllegalArgumentException("[Assertion failed] - the object argument must be null"); |
void | assertNull(Object object, String errMsg) assert Null if (object != null) { throw new RuntimeException(errMsg); |
void | assertNull(Object object, String message) Solleva una @link(IllegalArgumentException) con message message in caso di object non null if (object != null) { throw new IllegalArgumentException(message); |
void | assertNull(String message, Object object) assert Null assertTrue(message, object == null); |
void | assertNull(String message, Object object) Asserts that an object is null. assertTrue(message, object == null); |
void | assertNull(String message, Object val) assert Null if (message != null) assert val == null : message; else assert val == null; |
void | assertNull(String string, Object obj) assert Null assertTrue(string, obj == null); |
void | assertObjectNullOrIsInstance(Object obj, Class expectedType, String name) Check if the given object is an instance of the expected class. if (obj != null && !expectedType.isInstance(obj)) { throw new IllegalArgumentException(name + " of type [" + obj.getClass().getName() + "] should be an instance of " + expectedType.getName()); |