added extra assert methods
@@ -20,6 +20,15 @@ protected void fail(
throw new TestFailedException(SimpleTestResult.failed(this, message));
}
+ protected void isTrue(
+ boolean value)
+ {
+ if (!value)
+ {
+ throw new TestFailedException(SimpleTestResult.failed(this, "no message"));
+ }
+ }
+
protected void isTrue(
String message,
boolean value)
@@ -30,6 +39,27 @@ protected void isTrue(
}
}
+ protected void isEquals(
+ Object a,
+ Object b)
+ {
+ if (!a.equals(b))
+ {
+ throw new TestFailedException(SimpleTestResult.failed(this, "no message"));
+ }
+ }
+
+ protected void isEquals(
+ String message,
+ Object a,
+ Object b)
+ {
+ if (!a.equals(b))
+ {
+ throw new TestFailedException(SimpleTestResult.failed(this, message));
+ }
+ }
+
protected void fail(
String message,
Throwable throwable)
