Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit b673441

Browse files
committed
Use Hamcrest syntax for the compliance tests
Not sure why this wasn't the case already, my IDE complained about the syntax
1 parent e673d08 commit b673441

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

jmespath-core/src/test/java/io/burt/jmespath/JmesPathComplianceTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.junit.runner.RunWith;
1919
import org.hamcrest.Matcher;
2020

21-
import static org.junit.Assert.assertTrue;
21+
import static org.hamcrest.Matchers.is;
2222
import static org.junit.Assert.assertThat;
2323
import static org.junit.Assert.fail;
2424
import static org.hamcrest.Matchers.containsString;
@@ -72,9 +72,10 @@ public void run() {
7272
Expression<U> compiledExpression = runtime.compile(expression);
7373
U result = compiledExpression.search(input);
7474
if (expectedError == null) {
75-
assertTrue(
75+
assertThat(
7676
String.format("Expected <%s> to be <%s>, expression <%s> compiled expression <%s>", result, expectedResult, expression, compiledExpression),
77-
runtime.compare(expectedResult, result) == 0
77+
runtime.compare(expectedResult, result),
78+
is(0)
7879
);
7980
} else {
8081
fail(String.format("Expected \"%s\" error", expectedError));

0 commit comments

Comments
 (0)