testing work

This commit is contained in:
eugenp 2015-12-27 23:55:25 +02:00
parent eea69135f7
commit 93d6e3f67a
5 changed files with 15 additions and 5 deletions

View File

@ -53,6 +53,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 -->

View File

@ -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 -->

View File

@ -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

View File

@ -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() {

View File

@ -8,6 +8,7 @@ import org.junit.runners.Suite;
FooPaginationPersistenceIntegrationTest.class
,FooServicePersistenceIntegrationTest.class
,FooServiceSortingTests.class
,JpaMultipleDBTest.class
// manual only
// ,FooServiceSortingWitNullsManualTest.class
}) // @formatter:on