Merge pull request #228 from alex-semenyuk/master

using the java version MongoConfig
This commit is contained in:
Eugen 2015-07-29 10:31:21 -07:00
commit d09c981353
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package org.baeldung.repository;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
import org.baeldung.config.MongoConfig;
import org.baeldung.model.User; import org.baeldung.model.User;
import org.baeldung.repository.UserRepository; import org.baeldung.repository.UserRepository;
import org.junit.After; import org.junit.After;
@ -17,7 +18,7 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("file:src/main/resources/mongoConfig.xml") @ContextConfiguration(classes={MongoConfig.class, UserRepository.class})
public class UserRepositoryIntegrationTest { public class UserRepositoryIntegrationTest {
@Autowired @Autowired
private UserRepository userRepository; private UserRepository userRepository;