mmiklavc commented on a change in pull request #1554: METRON-2307: Migrate to
JUnit5
URL: https://github.com/apache/metron/pull/1554#discussion_r346952052
##########
File path:
metron-analytics/metron-statistics/src/test/java/org/apache/metron/statistics/outlier/MedianAbsoluteDeviationTest.java
##########
@@ -93,23 +94,23 @@ public void test() {
}
{
Double score = (Double) run("OUTLIER_MAD_SCORE(currentState, value)",
ImmutableMap.of("currentState", currentState, "value", stats.getMin()));
- Assert.assertTrue("Score: " + score + " is not an outlier despite being
a minimum.", score > 3.5);
+ assertTrue(score > 3.5, "Score: " + score + " is not an outlier despite
being a minimum.");
Review comment:
Aw geeze, they reversed the test case and the failure message in the new
API. Meanwhile, Hamcrest still has the other order:
```
public static void assertTrue(boolean condition, String message) {
AssertTrue.assertTrue(condition, message);
}
vs
public static <T> void assertThat(String reason, T actual, Matcher<? super
T> matcher)
```
ಠ_ಠ
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services