|
|
|
@ -17,6 +17,7 @@ package org.springframework.data.jdbc.repository; |
|
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.*; |
|
|
|
import static org.assertj.core.api.Assertions.*; |
|
|
|
import static org.springframework.data.jdbc.testing.TestDatabaseFeatures.Feature.*; |
|
|
|
import static org.springframework.data.jdbc.testing.TestDatabaseFeatures.Feature.*; |
|
|
|
|
|
|
|
import static org.springframework.test.context.TestExecutionListeners.MergeMode.*; |
|
|
|
|
|
|
|
|
|
|
|
import junit.framework.AssertionFailedError; |
|
|
|
import junit.framework.AssertionFailedError; |
|
|
|
import lombok.Data; |
|
|
|
import lombok.Data; |
|
|
|
@ -28,17 +29,21 @@ import java.util.Map; |
|
|
|
import org.junit.ClassRule; |
|
|
|
import org.junit.ClassRule; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
import org.junit.runner.RunWith; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.Import; |
|
|
|
import org.springframework.context.annotation.Import; |
|
|
|
import org.springframework.data.annotation.Id; |
|
|
|
import org.springframework.data.annotation.Id; |
|
|
|
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory; |
|
|
|
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory; |
|
|
|
|
|
|
|
import org.springframework.data.jdbc.testing.AssumeFeatureRule; |
|
|
|
import org.springframework.data.jdbc.testing.EnabledOnFeature; |
|
|
|
import org.springframework.data.jdbc.testing.EnabledOnFeature; |
|
|
|
import org.springframework.data.jdbc.testing.TestConfiguration; |
|
|
|
import org.springframework.data.jdbc.testing.TestConfiguration; |
|
|
|
import org.springframework.data.repository.CrudRepository; |
|
|
|
import org.springframework.data.repository.CrudRepository; |
|
|
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; |
|
|
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; |
|
|
|
import org.springframework.test.context.ContextConfiguration; |
|
|
|
import org.springframework.test.context.ContextConfiguration; |
|
|
|
|
|
|
|
import org.springframework.test.context.TestExecutionListeners; |
|
|
|
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner; |
|
|
|
import org.springframework.test.context.junit4.rules.SpringClassRule; |
|
|
|
import org.springframework.test.context.junit4.rules.SpringClassRule; |
|
|
|
import org.springframework.test.context.junit4.rules.SpringMethodRule; |
|
|
|
import org.springframework.test.context.junit4.rules.SpringMethodRule; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@ -51,6 +56,8 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ContextConfiguration |
|
|
|
@ContextConfiguration |
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
|
|
|
|
@TestExecutionListeners(value = AssumeFeatureRule.class, mergeMode = MERGE_WITH_DEFAULTS) |
|
|
|
|
|
|
|
@RunWith(SpringRunner.class) |
|
|
|
public class JdbcRepositoryWithMapsIntegrationTests { |
|
|
|
public class JdbcRepositoryWithMapsIntegrationTests { |
|
|
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
@ -70,9 +77,6 @@ public class JdbcRepositoryWithMapsIntegrationTests { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ClassRule public static final SpringClassRule classRule = new SpringClassRule(); |
|
|
|
|
|
|
|
@Rule public SpringMethodRule methodRule = new SpringMethodRule(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired NamedParameterJdbcTemplate template; |
|
|
|
@Autowired NamedParameterJdbcTemplate template; |
|
|
|
@Autowired DummyEntityRepository repository; |
|
|
|
@Autowired DummyEntityRepository repository; |
|
|
|
|
|
|
|
|
|
|
|
|