|
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | | -package software.xdev.spring.data.eclipse.store.integration.shared.tests; |
| 16 | +package software.xdev.spring.data.eclipse.store.integration.isolated.tests.id; |
17 | 17 |
|
18 | 18 | import static software.xdev.spring.data.eclipse.store.helper.TestUtil.restartDatastore; |
19 | 19 |
|
|
23 | 23 | import org.junit.jupiter.api.Assertions; |
24 | 24 | import org.junit.jupiter.api.Test; |
25 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
| 26 | +import org.springframework.test.context.ContextConfiguration; |
26 | 27 |
|
27 | 28 | import software.xdev.spring.data.eclipse.store.helper.TestData; |
28 | 29 | import software.xdev.spring.data.eclipse.store.helper.TestUtil; |
29 | | -import software.xdev.spring.data.eclipse.store.integration.shared.DefaultTestAnnotations; |
30 | | -import software.xdev.spring.data.eclipse.store.integration.shared.SharedTestConfiguration; |
31 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdInt; |
32 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdIntRepository; |
33 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdInteger; |
34 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdIntegerNoAutoGenerate; |
35 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdIntegerNoAutoGenerateRepository; |
36 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdIntegerRepository; |
37 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdLong; |
38 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdLongRepository; |
39 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdString; |
40 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithIdStringRepository; |
41 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithPurchase; |
42 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.CustomerWithPurchaseRepository; |
43 | | -import software.xdev.spring.data.eclipse.store.integration.shared.repositories.id.Purchase; |
| 30 | +import software.xdev.spring.data.eclipse.store.integration.isolated.IsolatedTestAnnotations; |
| 31 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdInt; |
| 32 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdIntRepository; |
| 33 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdInteger; |
| 34 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdIntegerNoAutoGenerate; |
| 35 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdIntegerNoAutoGenerateRepository; |
| 36 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdIntegerRepository; |
| 37 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdLong; |
| 38 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdLongRepository; |
| 39 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdString; |
| 40 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithIdStringRepository; |
| 41 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithPurchase; |
| 42 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.CustomerWithPurchaseRepository; |
| 43 | +import software.xdev.spring.data.eclipse.store.integration.isolated.tests.id.model.Purchase; |
44 | 44 | import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; |
45 | 45 |
|
46 | 46 |
|
47 | 47 | @SuppressWarnings("OptionalGetWithoutIsPresent") |
48 | | -@DefaultTestAnnotations |
| 48 | +@IsolatedTestAnnotations |
| 49 | +@ContextConfiguration(classes = {IdTestConfiguration.class}) |
49 | 50 | class IdTest |
50 | 51 | { |
| 52 | + private final IdTestConfiguration configuration; |
| 53 | + |
51 | 54 | @Autowired |
52 | | - private SharedTestConfiguration configuration; |
| 55 | + public IdTest(final IdTestConfiguration configuration) |
| 56 | + { |
| 57 | + this.configuration = configuration; |
| 58 | + } |
53 | 59 |
|
54 | 60 | @Test |
55 | 61 | void testCreateSingleWithAutoIdInteger(@Autowired final CustomerWithIdIntegerRepository customerRepository) |
@@ -90,7 +96,8 @@ void testSaveSingleWithoutAnyPreviousCall(@Autowired final CustomerWithIdInteger |
90 | 96 |
|
91 | 97 | @Test |
92 | 98 | void testCreateSingleWithAutoIdIntegerWorkingCopyIdSet( |
93 | | - @Autowired final CustomerWithIdIntegerRepository customerRepository) |
| 99 | + @Autowired final CustomerWithIdIntegerRepository customerRepository |
| 100 | + ) |
94 | 101 | { |
95 | 102 | final CustomerWithIdInteger customer1 = new CustomerWithIdInteger(TestData.FIRST_NAME, TestData.LAST_NAME); |
96 | 103 | Assertions.assertNull(customer1.getId()); |
@@ -120,7 +127,8 @@ void testCreateMultipleWithAutoIdInteger(@Autowired final CustomerWithIdIntegerR |
120 | 127 |
|
121 | 128 | @Test |
122 | 129 | void testCreateMultipleWithAutoIdIntegerSingleFinds( |
123 | | - @Autowired final CustomerWithIdIntegerRepository customerRepository) |
| 130 | + @Autowired final CustomerWithIdIntegerRepository customerRepository |
| 131 | + ) |
124 | 132 | { |
125 | 133 | final CustomerWithIdInteger customer1 = new CustomerWithIdInteger(TestData.FIRST_NAME, TestData.LAST_NAME); |
126 | 134 | customerRepository.save(customer1); |
@@ -274,7 +282,8 @@ void testCreateMultipleWithNoAutoIdInteger( |
274 | 282 |
|
275 | 283 | @Test |
276 | 284 | void testSaveSingleWithAutoIdInteger( |
277 | | - @Autowired final CustomerWithIdIntegerRepository customerRepository) |
| 285 | + @Autowired final CustomerWithIdIntegerRepository customerRepository |
| 286 | + ) |
278 | 287 | { |
279 | 288 | final CustomerWithIdInteger customer1 = |
280 | 289 | new CustomerWithIdInteger(); |
|
0 commit comments