File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
main/java/org/springframework/data/domain
test/java/org/springframework/data/repository/core/support Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ public static GenericPropertyMatcher startsWith() {
608
608
* @return
609
609
*/
610
610
public static GenericPropertyMatcher exact () {
611
- return new GenericPropertyMatcher ().startsWith ();
611
+ return new GenericPropertyMatcher ().exact ();
612
612
}
613
613
614
614
/**
Original file line number Diff line number Diff line change 38
38
* @author Mark Paluch
39
39
* @soundtrack Ron Spielman Trio - Fretboard Highway (Electric Tales)
40
40
*/
41
- @ SuppressWarnings ("unused" )
42
41
public class ExampleSpecificationAccessorUnitTests {
43
42
44
43
Person person ;
@@ -322,6 +321,19 @@ public void hasPropertySpecifiersReturnsTrueWhenAtLeastOneIsSet() {
322
321
assertThat (exampleSpecificationAccessor .hasPropertySpecifiers (), is (true ));
323
322
}
324
323
324
+ /**
325
+ * @see DATACMNS-953
326
+ */
327
+ @ Test
328
+ public void exactMatcherUsesExactMatching () {
329
+
330
+ ExampleMatcher matcher = ExampleMatcher .matching ()//
331
+ .withMatcher ("firstname" , exact ());
332
+
333
+ assertThat (new ExampleMatcherAccessor (matcher ).getPropertySpecifier ("firstname" ).getStringMatcher (),
334
+ is (StringMatcher .EXACT ));
335
+ }
336
+
325
337
static class Person {
326
338
String firstname ;
327
339
}
You can’t perform that action at this time.
0 commit comments