@@ -49,7 +49,7 @@ public class Order {
|
||||
* @param orderDate
|
||||
*/
|
||||
public Order(String customerId, Date orderDate) {
|
||||
this(null, customerId, orderDate, new ArrayList<LineItem>());
|
||||
this(null, customerId, orderDate, new ArrayList<>());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
package example.springdata.multistore;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import example.springdata.multistore.customer.Customer;
|
||||
import example.springdata.multistore.shop.Order;
|
||||
|
||||
@@ -31,6 +28,8 @@ import org.springframework.data.mongodb.repository.query.MongoEntityInformation;
|
||||
import org.springframework.data.repository.support.Repositories;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration test to check repository interfaces are assigned to the correct store modules.
|
||||
*
|
||||
@@ -45,9 +44,9 @@ public class ApplicationConfigurationTest {
|
||||
@Test
|
||||
public void repositoriesAreAssignedToAppropriateStores() {
|
||||
|
||||
Repositories repositories = new Repositories(context);
|
||||
var repositories = new Repositories(context);
|
||||
|
||||
assertThat(repositories.getEntityInformationFor(Customer.class), is(instanceOf(JpaEntityInformation.class)));
|
||||
assertThat(repositories.getEntityInformationFor(Order.class), is(instanceOf(MongoEntityInformation.class)));
|
||||
assertThat(repositories.getEntityInformationFor(Customer.class)).isInstanceOf(JpaEntityInformation.class);
|
||||
assertThat(repositories.getEntityInformationFor(Order.class)).isInstanceOf(MongoEntityInformation.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user