From f43d6e4f2bd8bb8111eabfe0c20e10014c2ad3e9 Mon Sep 17 00:00:00 2001 From: "Cimon Lucas (LCM)" Date: Thu, 25 Oct 2018 19:24:48 +0200 Subject: [PATCH] Adding test for ...IgnoreCase SpringQuery method name --- .../com/github/fakemongo/integration/SpringQueryTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100644 => 100755 src/test/java/com/github/fakemongo/integration/SpringQueryTest.java diff --git a/src/test/java/com/github/fakemongo/integration/SpringQueryTest.java b/src/test/java/com/github/fakemongo/integration/SpringQueryTest.java old mode 100644 new mode 100755 index 28179c72..04a4045a --- a/src/test/java/com/github/fakemongo/integration/SpringQueryTest.java +++ b/src/test/java/com/github/fakemongo/integration/SpringQueryTest.java @@ -50,6 +50,11 @@ public void should_mixed_data_works_in_spring() throws Exception { assertThat(repository.findLongListWithQuery(10L)).isNotNull(); assertThat(repository.findLongListWithQuery(longList)).hasSize(1); assertThat(repository.findLongListWithQuery(10L)).hasSize(1); + + DomainObject match = repository.findByLongList(10L).get(0); + assertThat(repository.findBy_id(match.get_id())).isNotNull(); + assertThat(repository.findBy_idIgnoreCase(match.get_id())).isNotNull(); + ctx.close(); } @@ -147,4 +152,7 @@ interface QueryRepository extends MongoRepository findByLongList(Long foo); List findByLongList(List foo); + + SpringQueryTest.DomainObject findBy_id(String id); + SpringQueryTest.DomainObject findBy_idIgnoreCase(String id); }