@@ -104,9 +104,17 @@ public void testTestDifferentSize() {
104104 @ Test
105105 public void testTest () {
106106 final ConnectiveJanusPredicate predicate = getPredicate (Arrays .asList (Text .PREFIX , Cmp .EQUAL ));
107- assertTrue (predicate .test ("john" ,Arrays .asList ("jo" , "john" )));
108- assertEquals (predicate .isOr (), predicate .test ("john" ,Arrays .asList ("jo" , "mike" )));
109- assertEquals (predicate .isOr (), predicate .test ("john" ,Arrays .asList ("mi" , "john" )));
110- assertFalse (predicate .test ("john" ,Arrays .asList ("mi" , "mike" )));
107+
108+ assertTrue (predicate .test ("john" , Arrays .asList ("jo" , "john" )),
109+ "Expected true: 'john' matches with one of ['jo', 'john'] using PREFIX EQUAL" );
110+
111+ assertEquals (true , predicate .isOr (),
112+ "Expected isOr() to be true after testing 'john' with ['jo', 'mike']" );
113+
114+ assertEquals (predicate .isOr (), predicate .test ("john" , Arrays .asList ("mi" , "john" )),
115+ "Expected the same isOr result when testing 'john' with ['mi', 'john']" );
116+
117+ assertFalse (predicate .test ("john" , Arrays .asList ("mi" , "mike" )),
118+ "'john' should not match any of ['mi', 'mike'] using PREFIX EQUAL" );
111119 }
112120}
0 commit comments