BAEL-3917: Fix the integrations tests in ddd (#9708)
This commit is contained in:
+11
-6
@@ -1,19 +1,24 @@
|
||||
package com.baeldung.ddd.order.jpa;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/*
|
||||
To run this test we need to run the databases first.
|
||||
A dedicated docker-compose.yml file is located under the resources directory.
|
||||
We can run it by simple executing `docker-compose up`.
|
||||
*/
|
||||
@SpringJUnitConfig
|
||||
@SpringBootTest
|
||||
public class PersistOrderIntegrationTest {
|
||||
public class PersistOrderLiveTest {
|
||||
@Autowired
|
||||
private JpaOrderRepository repository;
|
||||
|
||||
+6
-1
@@ -17,9 +17,14 @@ import com.baeldung.ddd.order.Order;
|
||||
import com.baeldung.ddd.order.OrderLine;
|
||||
import com.baeldung.ddd.order.Product;
|
||||
|
||||
/*
|
||||
To run this test we need to run the databases first.
|
||||
A dedicated docker-compose.yml file is located under the resources directory.
|
||||
We can run it by simple executing `docker-compose up`.
|
||||
*/
|
||||
@SpringJUnitConfig
|
||||
@SpringBootTest
|
||||
public class OrderMongoIntegrationTest {
|
||||
public class OrderMongoLiveTest {
|
||||
@Autowired
|
||||
private OrderMongoRepository repo;
|
||||
|
||||
+6
-1
@@ -18,10 +18,15 @@ import com.baeldung.dddhexagonalspring.domain.Product;
|
||||
import com.baeldung.dddhexagonalspring.domain.repository.OrderRepository;
|
||||
import com.baeldung.dddhexagonalspring.infrastracture.repository.cassandra.SpringDataCassandraOrderRepository;
|
||||
|
||||
/*
|
||||
To run this test we need to run the databases first.
|
||||
A dedicated docker-compose.yml file is located under the resources directory.
|
||||
We can run it by simple executing `docker-compose up`.
|
||||
*/
|
||||
@SpringJUnitConfig
|
||||
@SpringBootTest
|
||||
@TestPropertySource("classpath:ddd-layers-test.properties")
|
||||
class CassandraDbOrderRepositoryIntegrationTest {
|
||||
class CassandraDbOrderRepositoryLiveTest {
|
||||
|
||||
@Autowired
|
||||
private SpringDataCassandraOrderRepository cassandraOrderRepository;
|
||||
+6
-1
@@ -18,10 +18,15 @@ import com.baeldung.dddhexagonalspring.domain.Product;
|
||||
import com.baeldung.dddhexagonalspring.domain.repository.OrderRepository;
|
||||
import com.baeldung.dddhexagonalspring.infrastracture.repository.mongo.SpringDataMongoOrderRepository;
|
||||
|
||||
/*
|
||||
To run this test we need to run the databases first.
|
||||
A dedicated docker-compose.yml file is located under the resources directory.
|
||||
We can run it by simple executing `docker-compose up`.
|
||||
*/
|
||||
@SpringJUnitConfig
|
||||
@SpringBootTest
|
||||
@TestPropertySource("classpath:ddd-layers-test.properties")
|
||||
class MongoDbOrderRepositoryIntegrationTest {
|
||||
class MongoDbOrderRepositoryLiveTest {
|
||||
|
||||
@Autowired
|
||||
private SpringDataMongoOrderRepository mongoOrderRepository;
|
||||
Reference in New Issue
Block a user