nastra commented on code in PR #3654:
URL: https://github.com/apache/parquet-java/pull/3654#discussion_r3549605452
##########
parquet-common/src/test/java/org/apache/parquet/glob/TestWildcardPath.java:
##########
@@ -18,121 +18,172 @@
*/
package org.apache.parquet.glob;
-import static org.junit.Assert.fail;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class TestWildcardPath {
- private static void assertMatches(WildcardPath wp, String... strings) {
- for (String s : strings) {
- if (!wp.matches(s)) {
- fail(String.format("String '%s' was expected to match '%s'", s, wp));
- }
- }
- }
-
- private static void assertDoesNotMatch(WildcardPath wp, String... strings) {
- for (String s : strings) {
- if (wp.matches(s)) {
- fail(String.format("String '%s' was not expected to match '%s'", s,
wp));
- }
- }
- }
-
@Test
public void testNoWildcards() {
WildcardPath wp = new WildcardPath("", "foo", '.');
- assertMatches(wp, "foo", "foo.x", "foo.x.y");
- assertDoesNotMatch(wp, "xfoo", "xfoox", "fooa.x.y");
+
+ assertThat(wp.matches("foo")).isTrue();
Review Comment:
it is easier to debug a single line if the test ever fails
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]