Package org.dbunit.assertion
Class SimpleAssert
java.lang.Object
org.dbunit.assertion.SimpleAssert
- Direct Known Subclasses:
AbstractDatabaseTester
Dbunit's own small assertion utility, independent from the testing framework
that is used.
- Since:
- 2.4.0
- Version:
- $Revision$ $Date$
- Author:
- gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleAssert(FailureHandler failureHandler) Constructs aSimpleAssertreporting failures through the given handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidassertNotNull(Object object) Evaluate that the given object is notnull.voidassertNotNull(String message, Object object) Evaluate that the given object is notnull.protected voidassertNotNullNorEmpty(String propertyName, String property) Asserts that propertyName is not a null String and has a length greater than zero.voidassertTrue(boolean condition) Evaluate if the given condition istrueor not.voidassertTrue(String message, boolean condition) Evaluate if the given condition istrueor not.voidReports a failure through this instance'sFailureHandler.
-
Constructor Details
-
SimpleAssert
Constructs aSimpleAssertreporting failures through the given handler.- Parameters:
failureHandler- the handler used to report failures.
-
-
Method Details
-
assertNotNullNorEmpty
Asserts that propertyName is not a null String and has a length greater than zero.- Parameters:
propertyName- the name of the property being validated, used in the failure message.property- the property value to validate.
-
assertTrue
public void assertTrue(boolean condition) Evaluate if the given condition istrueor not.- Parameters:
condition- condition to be tested
-
assertTrue
Evaluate if the given condition istrueor not.- Parameters:
message- message displayed if assertion is falsecondition- condition to be tested
-
assertNotNull
Evaluate that the given object is notnull.- Parameters:
object- the object to check.
-
assertNotNull
Evaluate that the given object is notnull.- Parameters:
message- message displayed if assertion is falseobject- the object to check.
-
fail
Reports a failure through this instance'sFailureHandler.- Parameters:
message- message displayed for the failure.
-