From: Gustavo Martin Morcuende Date: Fri, 5 Jun 2015 00:13:57 +0000 (+0200) Subject: using maven-surefire-plugin and maven-failsafe-plugin X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=ef77ed6815d6be95c47970c609853dacdb3b2d89;p=SpringWebServicesForFun%2F.git using maven-surefire-plugin and maven-failsafe-plugin --- diff --git a/web-services-spring-server/src/test/java/de/spring/webservices/services/CustomBindingExampleServiceTest.java b/web-services-spring-server/src/test/java/de/spring/webservices/services/CustomBindingExampleServiceTest.java new file mode 100644 index 0000000..a6d493b --- /dev/null +++ b/web-services-spring-server/src/test/java/de/spring/webservices/services/CustomBindingExampleServiceTest.java @@ -0,0 +1,34 @@ +package de.spring.webservices.services; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import de.spring.webservices.auto.CustomBindingExampleRequest; +import de.spring.webservices.auto.CustomBindingExampleResponse; +import de.spring.webservices.operations.Operations; +import de.spring.webservices.services.impl.CustomBindingExampleServiceImpl; + + +public class CustomBindingExampleServiceTest { + + private Operations.RequestResponse + customBindingExampleService; + + @Before + public void init() { + customBindingExampleService = new CustomBindingExampleServiceImpl(); + } + + @Test + public void givenCustomBindingExampleRequestThenReturnCustomBindingExampleResponse() { + CustomBindingExampleRequest request = new CustomBindingExampleRequest(); + request.setData("SCARLETT"); + CustomBindingExampleResponse expected = new CustomBindingExampleResponse(); + expected.setData("CUSTOM BINDING SNAKE EYES AND " + request.getData()); + + CustomBindingExampleResponse actual = customBindingExampleService.requestResponse(request); + + Assert.assertEquals(expected.getData(), actual.getData()); + } +} diff --git a/web-services-spring-server/src/test/java/de/spring/webservices/services/impl/CustomBindingExampleServiceTest.java b/web-services-spring-server/src/test/java/de/spring/webservices/services/impl/CustomBindingExampleServiceTest.java deleted file mode 100644 index 45c019a..0000000 --- a/web-services-spring-server/src/test/java/de/spring/webservices/services/impl/CustomBindingExampleServiceTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package de.spring.webservices.services.impl; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import de.spring.webservices.auto.CustomBindingExampleRequest; -import de.spring.webservices.auto.CustomBindingExampleResponse; -import de.spring.webservices.operations.Operations; - - -public class CustomBindingExampleServiceTest { - - private Operations.RequestResponse - customBindingExampleService; - - @Before - public void init() { - customBindingExampleService = new CustomBindingExampleServiceImpl(); - } - - @Test - public void givenCustomBindingExampleRequestThenReturnCustomBindingExampleResponse() { - CustomBindingExampleRequest request = new CustomBindingExampleRequest(); - request.setData("SCARLETT"); - CustomBindingExampleResponse expected = new CustomBindingExampleResponse(); - expected.setData("CUSTOM BINDING SNAKE EYES AND " + request.getData()); - - CustomBindingExampleResponse actual = customBindingExampleService.requestResponse(request); - - Assert.assertEquals(expected.getData(), actual.getData()); - } -} diff --git a/web-services-spring/pom.xml b/web-services-spring/pom.xml index 3158e24..1329ec8 100644 --- a/web-services-spring/pom.xml +++ b/web-services-spring/pom.xml @@ -20,6 +20,7 @@ UTF-8 + UTF-8 4.0.9.RELEASE 2.2.1.RELEASE @@ -107,6 +108,22 @@ + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.18.1 + + + + org.apache.maven.plugins @@ -143,6 +160,35 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*Test.java + + + **/*IntegrationTest.java + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + + + + **/*IntegrationTest.java + + +