From d63b7e8cab06f0548a9f486568aa19bc4ced74b9 Mon Sep 17 00:00:00 2001 From: coach88 Date: Sat, 8 Aug 2015 11:23:12 +0300 Subject: [PATCH] Minor cleanup with tests and infrastructure --- spring-data-mongodb/.classpath | 58 +++++++++++-------- spring-data-mongodb/.project | 37 +++++------- .../MongoRepositoryQueryIntegrationTest.java | 8 ++- 3 files changed, 57 insertions(+), 46 deletions(-) diff --git a/spring-data-mongodb/.classpath b/spring-data-mongodb/.classpath index 8df09bc858..b049bd7d47 100644 --- a/spring-data-mongodb/.classpath +++ b/spring-data-mongodb/.classpath @@ -1,27 +1,39 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-data-mongodb/.project b/spring-data-mongodb/.project index ad5b57cb82..7a469b9f7a 100644 --- a/spring-data-mongodb/.project +++ b/spring-data-mongodb/.project @@ -1,23 +1,18 @@ - spring-data-mongodb - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - + spring-data-mongodb + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + + + + org.eclipse.jdt.core.javabuilder + + + org.eclipse.m2e.core.maven2Builder + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + \ No newline at end of file diff --git a/spring-data-mongodb/src/test/java/org/baeldung/repository/MongoRepositoryQueryIntegrationTest.java b/spring-data-mongodb/src/test/java/org/baeldung/repository/MongoRepositoryQueryIntegrationTest.java index 4a741c49a7..b58981a840 100644 --- a/spring-data-mongodb/src/test/java/org/baeldung/repository/MongoRepositoryQueryIntegrationTest.java +++ b/spring-data-mongodb/src/test/java/org/baeldung/repository/MongoRepositoryQueryIntegrationTest.java @@ -102,12 +102,16 @@ public class MongoRepositoryQueryIntegrationTest { @Test public void givenUsersExist_whenFindingUsersAndCount_thenUserAreFound() { User user = new User(); - user.setName("Alexey"); + user.setName("Alex"); + mongoOps.insert(user); + + user = new User(); + user.setName("Mat"); mongoOps.insert(user); QUser qUser = new QUser("user"); - Predicate predicate = qUser.name.eq("Alexey"); + Predicate predicate = qUser.name.eq("Alex"); List users = (List) userRepository.findAll(predicate); assertThat(users.size(), is(1));