BAEL-1924 (#4590)
* Revert "BAEL-1924 (#4573)"
This reverts commit b1b34e2fca.
* BAEL-1924 move code to new spring-boot-persistence module
* BAEL-1924 add new spring-boot-persistence module
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
package org.baeldung.boot.repository;
|
||||
|
||||
import org.baeldung.boot.domain.User;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Created by adam.
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DataJpaTest
|
||||
public class UserRepositoryDataJpaIntegrationTest {
|
||||
|
||||
@Autowired private UserRepository userRepository;
|
||||
|
||||
@Test
|
||||
public void givenTwoImportFilesWhenFindAllShouldReturnSixUsers() {
|
||||
Collection<User> users = userRepository.findAll();
|
||||
|
||||
assertThat(users.size()).isEqualTo(6);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.baeldung.boot.repository;
|
||||
package org.baeldung.repository;
|
||||
|
||||
import org.baeldung.boot.config.H2JpaConfig;
|
||||
import org.baeldung.boot.domain.User;
|
||||
import org.baeldung.model.User;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -27,7 +27,8 @@ public class UserRepositoryIntegrationTest {
|
||||
private final String USER_NAME_ADAM = "Adam";
|
||||
private final Integer ACTIVE_STATUS = 1;
|
||||
|
||||
@Autowired private UserRepository userRepository;
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Test
|
||||
public void givenEmptyDBWhenFindOneByNameThenReturnEmptyOptional() {
|
||||
Reference in New Issue
Block a user