[Lada-commits] [PATCH 8 of 9] Updated stammdaten test

Wald Commits scm-commit at wald.intevation.org
Fri Dec 18 18:01:48 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1450457720 -3600
# Node ID 3d76d476894f3b7a2b93a1786a9e7825f8e6c257
# Parent  454a232c1331d5095808b1c07b427c8d5c1be11c
Updated stammdaten test.

diff -r 454a232c1331 -r 3d76d476894f src/test/java/de/intevation/lada/test/stamm/Stammdaten.java
--- a/src/test/java/de/intevation/lada/test/stamm/Stammdaten.java	Fri Dec 18 17:54:47 2015 +0100
+++ b/src/test/java/de/intevation/lada/test/stamm/Stammdaten.java	Fri Dec 18 17:55:20 2015 +0100
@@ -16,7 +16,6 @@
 import javax.ws.rs.core.Response;
 
 import org.junit.Assert;
-
 import org.hamcrest.Matcher;
 import org.hamcrest.Matchers;
 
@@ -25,8 +24,10 @@
 
 public class Stammdaten {
 
+    @SuppressWarnings("rawtypes")
     private static Map<String, Matcher> matchers;
 
+    @SuppressWarnings("rawtypes")
     public Stammdaten() {
         matchers = new HashMap<String, Matcher>();
 
@@ -186,14 +187,14 @@
     public final void getAll(URL baseUrl, String type, List<Protocol> protocol) {
         System.out.print(".");
         Protocol prot = new Protocol();
-        prot.setName(type + "Service");
+        prot.setName(type + " service");
         prot.setType("get all");
         prot.setPassed(false);
         protocol.add(prot);
         Assert.assertNotNull(type);
         /* Create a client*/
         Client client = ClientBuilder.newClient();
-        WebTarget target = client.target(baseUrl + type);
+        WebTarget target = client.target(baseUrl + "rest/" + type);
         /* Request all objects*/
         Response response = target.request()
             .header("X-SHIB-user", BaseTest.TEST_USER)
@@ -219,6 +220,7 @@
         prot.setPassed(true);
     }
 
+    @SuppressWarnings("unchecked")
     public final void getById(
         URL baseUrl,
         String type,
@@ -234,7 +236,7 @@
         try {
             /* Create a client*/
             Client client = ClientBuilder.newClient();
-            WebTarget target = client.target(baseUrl + type +"/" + id);
+            WebTarget target = client.target(baseUrl + "rest/" + type +"/" + id);
             prot.addInfo(type + "Id", id);
             /* Request an object by id*/
             Response response = target.request()


More information about the Lada-commits mailing list