Github user richardcloudsoft commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/52#discussion_r14664405
--- Diff: utils/common/src/main/java/brooklyn/test/Asserts.java ---
@@ -60,6 +65,16 @@ public static void assertTrue(boolean condition, String
message) {
}
/**
+ * Asserts that a condition is false. If it isn't,
+ * an AssertionError, with the given message, is thrown.
+ * @param condition the condition to evaluate
+ * @param message the assertion error message
+ */
+ public static void assertFalse(boolean condition, String message) {
+ if (condition) fail(message);
+ }
--- End diff --
How is this different from
[org.testng.Assert.assertFalse](http://testng.org/javadoc/org/testng/Assert.html#assertFalse(boolean,
java.lang.String))?
And, while we're at it, `assertTrue` just above and `fail` just below? I
can see they throw `java.lang.AssertionError`, which may be a difference, but
it seems to be wrong to me (that's for runtime `-ea` assertions not test
assertions)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---