diff --git a/src/test/java/org/springframework/samples/petclinic/web/OwnerControllerTest.java b/src/test/java/org/springframework/samples/petclinic/web/OwnerControllerTest.java new file mode 100644 index 00000000..a1d5474d --- /dev/null +++ b/src/test/java/org/springframework/samples/petclinic/web/OwnerControllerTest.java @@ -0,0 +1,24 @@ +package org.springframework.samples.petclinic.web; + +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.samples.petclinic.service.ClinicService; +import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; + +@SpringJUnitWebConfig(locations = {"classpath:spring/mvc-test-config.xml", "classpath:spring/mvc-core-config.xml"}) +class OwnerControllerTest { + + @Autowired + OwnerController ownerController; + + //autowired fromù XML bean mvc-test-config.xml + @Autowired + ClinicService clinicService; + + + @Test + void tempTest() { + + //ownerController + } +} \ No newline at end of file diff --git a/src/test/resources/spring/mvc-test-config.xml b/src/test/resources/spring/mvc-test-config.xml new file mode 100644 index 00000000..ab3b93bc --- /dev/null +++ b/src/test/resources/spring/mvc-test-config.xml @@ -0,0 +1,12 @@ + + + + + + + + +