From 095b1a35d92fada0ecc37d4bae2bcefb39abf32a Mon Sep 17 00:00:00 2001
From: Dave Syer
Date: Thu, 10 Nov 2016 17:45:54 +0000
Subject: [PATCH] Move util class to test code
---
...ServiceSpringDataJpaTests.java => ClinicServiceTests.java} | 4 ++--
.../springframework/samples/petclinic/util/EntityUtils.java | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename src/test/java/org/springframework/samples/petclinic/service/{ClinicServiceSpringDataJpaTests.java => ClinicServiceTests.java} (97%)
rename src/{main => test}/java/org/springframework/samples/petclinic/util/EntityUtils.java (100%)
diff --git a/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceSpringDataJpaTests.java b/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java
similarity index 97%
rename from src/test/java/org/springframework/samples/petclinic/service/ClinicServiceSpringDataJpaTests.java
rename to src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java
index cc658a146..f43633578 100644
--- a/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceSpringDataJpaTests.java
+++ b/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java
@@ -23,7 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* TestContext Framework:
- Spring IoC container caching which spares us unnecessary set up
* time between test execution.
- Dependency Injection of test fixture instances, meaning that
* we don't need to perform application context lookups. See the use of {@link Autowired @Autowired} on the
{@link
- * ClinicServiceSpringDataJpaTests#clinicService clinicService}
instance variable, which uses autowiring by
+ * ClinicServiceTests#clinicService clinicService} instance variable, which uses autowiring by
* type. - Transaction management, meaning each test method is executed in its own transaction,
* which is automatically rolled back by default. Thus, even if tests insert or otherwise change database state, there
* is no need for a teardown or cleanup script.
- An {@link org.springframework.context.ApplicationContext
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@DataJpaTest(includeFilters = @ComponentScan.Filter(Service.class))
-public class ClinicServiceSpringDataJpaTests {
+public class ClinicServiceTests {
@Autowired
protected ClinicService clinicService;
diff --git a/src/main/java/org/springframework/samples/petclinic/util/EntityUtils.java b/src/test/java/org/springframework/samples/petclinic/util/EntityUtils.java
similarity index 100%
rename from src/main/java/org/springframework/samples/petclinic/util/EntityUtils.java
rename to src/test/java/org/springframework/samples/petclinic/util/EntityUtils.java