testing work
This commit is contained in:
parent
1edcb35d2c
commit
3a4426e7ca
|
@ -77,6 +77,11 @@
|
|||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.el</groupId>
|
||||
<artifactId>javax.el-api</artifactId>
|
||||
<version>2.2.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- utils -->
|
||||
|
||||
|
|
|
@ -58,6 +58,11 @@
|
|||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.el</groupId>
|
||||
<artifactId>javax.el-api</artifactId>
|
||||
<version>2.2.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- utils -->
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.baeldung.persistence.model.Bar;
|
|||
import org.baeldung.persistence.model.Foo;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.support.AnnotationConfigContextLoader;
|
||||
|
@ -28,9 +27,6 @@ public class FooServiceSortingTests {
|
|||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
private FooService service;
|
||||
|
||||
// tests
|
||||
|
||||
@Test
|
||||
|
|
|
@ -21,13 +21,16 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = { UserConfig.class, ProductConfig.class })
|
||||
@TransactionConfiguration
|
||||
public class JPAMultipleDBTest {
|
||||
public class JpaMultipleDBTest {
|
||||
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
private ProductRepository productRepository;
|
||||
|
||||
// tests
|
||||
|
||||
@Test
|
||||
@Transactional("userTransactionManager")
|
||||
public void whenCreatingUser_thenCreated() {
|
|
@ -8,6 +8,7 @@ import org.junit.runners.Suite;
|
|||
FooPaginationPersistenceIntegrationTest.class
|
||||
,FooServicePersistenceIntegrationTest.class
|
||||
,FooServiceSortingTests.class
|
||||
,JpaMultipleDBTest.class
|
||||
// manual only
|
||||
// ,FooServiceSortingWitNullsManualTest.class
|
||||
}) // @formatter:on
|
||||
|
|
Loading…
Reference in New Issue