using maven-surefire-plugin and maven-failsafe-plugin
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Fri, 5 Jun 2015 00:13:57 +0000 (02:13 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Fri, 5 Jun 2015 00:13:57 +0000 (02:13 +0200)
web-services-spring-server/src/test/java/de/spring/webservices/services/CustomBindingExampleServiceTest.java [new file with mode: 0644]
web-services-spring-server/src/test/java/de/spring/webservices/services/impl/CustomBindingExampleServiceTest.java [deleted file]
web-services-spring/pom.xml

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 (file)
index 0000000..a6d493b
--- /dev/null
@@ -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
+       <CustomBindingExampleResponse, CustomBindingExampleRequest>  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 (file)
index 45c019a..0000000
+++ /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
-       <CustomBindingExampleResponse, CustomBindingExampleRequest>  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());
-       }
-}
index 3158e24..1329ec8 100644 (file)
@@ -20,6 +20,7 @@
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <!-- Be aware: spring-ws latest version does not follow spring-context latest version -->
     <spring.version>4.0.9.RELEASE</spring.version>
     <spring.ws.version>2.2.1.RELEASE</spring.ws.version>
    </dependencies>
   </dependencyManagement>
   <build>
+
+    <pluginManagement>
+       <plugins>
+         <plugin>
+           <groupId>org.apache.maven.plugins</groupId>
+           <artifactId>maven-surefire-plugin</artifactId>
+           <version>2.18.1</version>
+         </plugin>
+         <plugin>
+           <groupId>org.apache.maven.plugins</groupId>
+           <artifactId>maven-failsafe-plugin</artifactId>
+           <version>2.18.1</version>
+         </plugin>
+       </plugins>
+    </pluginManagement>
+
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
           </archive>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>**/*Test.java</include>
+          </includes>
+          <excludes>
+            <exclude>**/*IntegrationTest.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <includes>
+            <include>**/*IntegrationTest.java</include>
+          </includes>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>