changeset 831:3d76d476894f

Updated stammdaten test.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 18 Dec 2015 17:55:20 +0100
parents 454a232c1331
children 59c51da59b30
files src/test/java/de/intevation/lada/test/stamm/Stammdaten.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)