MARMOTTA-478: Fixed encoding for the archetype dummy tests.

Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/2c1b1f5e
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/2c1b1f5e
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/2c1b1f5e

Branch: refs/heads/ldp
Commit: 2c1b1f5e5538edaff47cdfb31767c03be65ac3fc
Parents: 40ebe23
Author: Jakob Frank <[email protected]>
Authored: Tue Apr 8 10:45:12 2014 +0200
Committer: Jakob Frank <[email protected]>
Committed: Tue Apr 8 11:05:47 2014 +0200

----------------------------------------------------------------------
 .../src/main/java/webservices/MyWebService.java   |  4 ++--
 .../test/java/webservices/MyWebServiceTest.java   | 18 ++++++++++--------
 build/pom.xml                                     |  1 -
 3 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/2c1b1f5e/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/main/java/webservices/MyWebService.java
----------------------------------------------------------------------
diff --git 
a/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/main/java/webservices/MyWebService.java
 
b/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/main/java/webservices/MyWebService.java
index 8c7a0e2..bde5bd2 100644
--- 
a/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/main/java/webservices/MyWebService.java
+++ 
b/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/main/java/webservices/MyWebService.java
@@ -41,7 +41,7 @@ public class MyWebService {
     private MyService myService;
 
     @GET
-    @Produces("text/html")
+    @Produces("text/plain; charset=utf8")
     public Response hello(@QueryParam("name") String name) {
         if (StringUtils.isEmpty(name)) {
             log.warn("No name given");
@@ -61,7 +61,7 @@ public class MyWebService {
         if (turns < 0) throw new DoThisException("Can't undo 'This'");
 
         myService.doThis(turns);
-        return Response.ok().build();
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/2c1b1f5e/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/test/java/webservices/MyWebServiceTest.java
----------------------------------------------------------------------
diff --git 
a/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/test/java/webservices/MyWebServiceTest.java
 
b/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/test/java/webservices/MyWebServiceTest.java
index c7126ce..ecbe00f 100644
--- 
a/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/test/java/webservices/MyWebServiceTest.java
+++ 
b/build/archetypes/marmotta-archetype-module/src/main/resources/archetype-resources/src/test/java/webservices/MyWebServiceTest.java
@@ -73,19 +73,21 @@ public class MyWebServiceTest {
     }
 
     @Test
-    @Ignore
     public void testNonAsciiHello() {
+        /*
+         * GET ?name=<xxx>
+         */
         RestAssured.given()
-                .contentType(ContentType.HTML)
                 .param("name", "Jürgen")
-                .expect()
+            .expect()
+                .contentType(ContentType.TEXT)
                 .content(containsString("Hello Jürgen"))
-                .when()
+            .when()
                 .get("/${moduleKey}");
 
         RestAssured.expect()
                 .statusCode(400)
-                .when()
+            .when()
                 .get("/${moduleKey}");
     }
 
@@ -97,19 +99,19 @@ public class MyWebServiceTest {
         RestAssured.given()
                 .param("turns", 1)
             .expect()
-                .statusCode(200)
+                .statusCode(204)
             .when()
                 .post("/${moduleKey}");
 
         RestAssured.given()
                 .param("turns", 10)
             .expect()
-                .statusCode(200)
+                .statusCode(204)
             .when()
                 .post("/${moduleKey}");
 
         RestAssured.expect()
-                .statusCode(200)
+                .statusCode(204)
             .when()
                 .post("/${moduleKey}");
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/2c1b1f5e/build/pom.xml
----------------------------------------------------------------------
diff --git a/build/pom.xml b/build/pom.xml
index 5558434..ca6b672 100644
--- a/build/pom.xml
+++ b/build/pom.xml
@@ -25,7 +25,6 @@
         <relativePath>../parent</relativePath>
     </parent>
 
-    <groupId>org.apache.marmotta</groupId>
     <artifactId>build-reactor</artifactId>
     <packaging>pom</packaging>
 

Reply via email to