[Lada-commits] [PATCH] Added and updated comments

Wald Commits scm-commit at wald.intevation.org
Tue Feb 17 17:03:21 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1424189053 -3600
# Node ID 1c8061b90b41109f757fb62102e23b6e952aa3af
# Parent  8d703ac5ad65196dc451a4460a97c9c05c4d24f3
Added and updated comments.

diff -r 8d703ac5ad65 -r 1c8061b90b41 src/test/java/de/intevation/lada/test/KommentarP.java
--- a/src/test/java/de/intevation/lada/test/KommentarP.java	Tue Feb 17 16:44:53 2015 +0100
+++ b/src/test/java/de/intevation/lada/test/KommentarP.java	Tue Feb 17 17:04:13 2015 +0100
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.test;
 
 import java.io.StringReader;
@@ -19,6 +26,12 @@
 
 import de.intevation.lada.Protocol;
 
+
+/**
+ * Class containing test cases for probekommentar objects.
+ *
+ * @author <a href="mailto:rrenkert at intevation.de">Raimund Renkert</a>
+ */
 public class KommentarP {
 
     private static final String COMPARE_KOMMENTARP =
@@ -35,21 +48,21 @@
     private static Integer createdKommentarId;
 
     /**
-     * @return the protocol
+     * @return The test protocol
      */
     public List<Protocol> getProtocol() {
         return protocol;
     }
 
     /**
-     * @return the createdKommentarId
+     * @return The created KommentarId
      */
     public Integer getCreatedKommentarId() {
         return createdKommentarId;
     }
 
     /**
-     * Test the GET Service by requesting all KommentarP objects.
+     * Test the GET Service by requesting all objects.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -64,7 +77,7 @@
         /* Create a client*/
         Client client = ClientBuilder.newClient();
         WebTarget target = client.target(baseUrl + "pkommentar");
-        /* Request all probe objects*/
+        /* Request all objects*/
         Response response = target.request().get();
         String entity = response.readEntity(String.class);
         try{
@@ -87,7 +100,7 @@
     }
 
     /**
-     * Test the GET Service by requesting a single KommentarP object by id.
+     * Test the GET Service by requesting a single object by id.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -190,7 +203,7 @@
             /* Create a client*/
             Client client = ClientBuilder.newClient();
             WebTarget target = client.target(baseUrl + "pkommentar");
-            /* Send a post request containing a new probe*/
+            /* Send a post request containing a new kommentar*/
             String mess = CREATE_KOMMENTARP.replace("PID", probeId.toString());
             Response response = target.request().post(
                     Entity.entity(mess, MediaType.APPLICATION_JSON));
@@ -247,7 +260,7 @@
             prot.addInfo("updated field", "text");
             prot.addInfo("updated value", "test");
             prot.addInfo("updated to", "neu");
-            /* Send the updated probe via put reauest*/
+            /* Send the updated kommentar via put reauest*/
             WebTarget putTarget = client.target(baseUrl + "pkommentar");
             Response updated = putTarget.request().put(
                 Entity.entity(updatedEntity, MediaType.APPLICATION_JSON));
@@ -288,7 +301,7 @@
             WebTarget target =
                 client.target(baseUrl + "pkommentar/" + createdKommentarId);
             prot.addInfo("kommentarId", createdKommentarId);
-            /* Delete a probe with the id saved when created a probe*/
+            /* Delete a kommentar with the saved id*/
             Response response = target.request().delete();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
diff -r 8d703ac5ad65 -r 1c8061b90b41 src/test/java/de/intevation/lada/test/Messung.java
--- a/src/test/java/de/intevation/lada/test/Messung.java	Tue Feb 17 16:44:53 2015 +0100
+++ b/src/test/java/de/intevation/lada/test/Messung.java	Tue Feb 17 17:04:13 2015 +0100
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.test;
 
 import java.io.StringReader;
@@ -19,6 +26,11 @@
 
 import de.intevation.lada.Protocol;
 
+/**
+ * Class containing test cases for messung objects.
+ *
+ * @author <a href="mailto:rrenkert at intevation.de">Raimund Renkert</a>
+ */
 public class Messung {
 
     private static final String COMPARE_MESSUNG =
@@ -41,14 +53,14 @@
     }
 
     /**
-     * @return the protocol
+     * @return The test protocol
      */
     public List<Protocol> getProtocol() {
         return protocol;
     }
 
     /**
-     * Test the GET Service by requesting all messung objects.
+     * Test the GET Service by requesting all objects.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -63,7 +75,7 @@
         /* Create a client*/
         Client client = ClientBuilder.newClient();
         WebTarget target = client.target(baseUrl + "messung");
-        /* Request all probe objects*/
+        /* Request all objects*/
         Response response = target.request().get();
         String entity = response.readEntity(String.class);
         try{
@@ -86,7 +98,7 @@
     }
 
     /**
-     * Test the GET Service by requesting a single messung object by id.
+     * Test the GET Service by requesting a single object by id.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -107,7 +119,7 @@
             Client client = ClientBuilder.newClient();
             WebTarget target = client.target(baseUrl + "messung/1");
             prot.addInfo("messungId", 1);
-            /* Request a probe object by id*/
+            /* Request a object by id*/
             Response response = target.request().get();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
@@ -131,7 +143,7 @@
     }
 
     /**
-     * Test the GET messung service using filters.
+     * Test the GET service using filters.
      *
      * @param baseUrl The url poining to the test deployment.
      */
@@ -148,7 +160,7 @@
             WebTarget target =
                 client.target(baseUrl + "messung?probeId=1");
             prot.addInfo("filter", "probeId=1");
-            /* Request the probe objects using the filter*/
+            /* Request the objects using the filter*/
             Response response = target.request().get();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
@@ -170,7 +182,7 @@
     }
 
     /**
-     * Test the messung CREATE Service.
+     * Test the CREATE Service.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -189,7 +201,7 @@
             /* Create a client*/
             Client client = ClientBuilder.newClient();
             WebTarget target = client.target(baseUrl + "messung");
-            /* Send a post request containing a new probe*/
+            /* Send a post request containing a new object*/
             String mess = CREATE_MESSUNG.replace("PID", probeId.toString());
             Response response = target.request().post(
                     Entity.entity(mess, MediaType.APPLICATION_JSON));
@@ -198,7 +210,7 @@
             JsonReader fromServiceReader =
                 Json.createReader(new StringReader(entity));
             JsonObject content = fromServiceReader.readObject();
-            /* Save the probeid*/
+            /* Save the id*/
             createdMessungId =
                 content.getJsonObject("data").getJsonNumber("id").intValue();
             prot.addInfo("messungId", createdMessungId);
@@ -216,7 +228,7 @@
     }
 
     /**
-     * Test the messung UPDATE Service.
+     * Test the UPDATE Service.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -234,19 +246,19 @@
             WebTarget target =
                 client.target(baseUrl + "messung/" + createdMessungId);
             prot.addInfo("messungId", createdMessungId);
-            /* Request a probe with the id saved when created a probe*/
+            /* Request a messung with the saved id*/
             Response response = target.request().get();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
             JsonReader reader = Json.createReader(new StringReader(entity));
             JsonObject oldMessung = reader.readObject().getJsonObject("data");
-            /* Change the hauptprobenNr*/
+            /* Change the mmtId*/
             String updatedEntity =
                 oldMessung.toString().replace("A4", "G1");
             prot.addInfo("updated field", "mmtId");
             prot.addInfo("updated value", "A4");
             prot.addInfo("updated to", "G1");
-            /* Send the updated probe via put reauest*/
+            /* Send the updated messung via put request*/
             WebTarget putTarget = client.target(baseUrl + "messung");
             Response updated = putTarget.request().put(
                 Entity.entity(updatedEntity, MediaType.APPLICATION_JSON));
@@ -270,7 +282,7 @@
     }
 
     /**
-     * Test the messung DELETE Service.
+     * Test the DELETE Service.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -287,7 +299,7 @@
             WebTarget target =
                 client.target(baseUrl + "messung/" + createdMessungId);
             prot.addInfo("messungId", createdMessungId);
-            /* Delete a probe with the id saved when created a probe*/
+            /* Delete a messung with the saved id*/
             Response response = target.request().delete();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
diff -r 8d703ac5ad65 -r 1c8061b90b41 src/test/java/de/intevation/lada/test/Probe.java
--- a/src/test/java/de/intevation/lada/test/Probe.java	Tue Feb 17 16:44:53 2015 +0100
+++ b/src/test/java/de/intevation/lada/test/Probe.java	Tue Feb 17 17:04:13 2015 +0100
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.test;
 
 import java.io.StringReader;
@@ -19,6 +26,12 @@
 
 import de.intevation.lada.Protocol;
 
+
+/**
+ * Class containing test cases for probe objects.
+ *
+ * @author <a href="mailto:rrenkert at intevation.de">Raimund Renkert</a>
+ */
 public class Probe {
 
     private static final String COMPARE_PROBE =
@@ -54,14 +67,14 @@
     }
 
     /**
-     * @return the protocol
+     * @return The test protocol
      */
     public List<Protocol> getProtocol() {
         return protocol;
     }
 
     /**
-     * Test the GET Service by requesting all probe objects.
+     * Test the GET Service by requesting all objects.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -76,7 +89,7 @@
         /* Create a client*/
         Client client = ClientBuilder.newClient();
         WebTarget target = client.target(baseUrl + "probe");
-        /* Request all probe objects*/
+        /* Request all objects*/
         Response response = target.request().get();
         String entity = response.readEntity(String.class);
         try{
@@ -99,7 +112,7 @@
     }
 
     /**
-     * Test the GET Service by requesting a single probe object by id.
+     * Test the GET Service by requesting a single object by id.
      *
      * @param baseUrl The url pointing to the test deployment.
      */
@@ -112,7 +125,7 @@
         prot.setPassed(false);
         protocol.add(prot);
         try {
-            /* Create a json object from static probe string*/
+            /* Create a json object from static string*/
             JsonReader fromStringRreader =
                 Json.createReader(new StringReader(COMPARE_PROBE));
             JsonObject staticProbe = fromStringRreader.readObject();
@@ -120,7 +133,7 @@
             Client client = ClientBuilder.newClient();
             WebTarget target = client.target(baseUrl + "probe/1");
             prot.addInfo("probeId", 1);
-            /* Request a probe object by id*/
+            /* Request a object by id*/
             Response response = target.request().get();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
@@ -144,7 +157,7 @@
     }
 
     /**
-     * Test the GET probe service using filters.
+     * Test the GET service using filters.
      *
      * @param baseUrl The url poining to the test deployment.
      */
@@ -161,7 +174,7 @@
             WebTarget target =
                 client.target(baseUrl + "probe?qid=2&mst_id=11010&umw_id=N24");
             prot.addInfo("filter", "qid=2&mst_id=11010&umw_id=N24");
-            /* Request the probe objects using the filter*/
+            /* Request the objects using the filter*/
             Response response = target.request().get();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
@@ -207,7 +220,7 @@
             JsonReader fromServiceReader =
                 Json.createReader(new StringReader(entity));
             JsonObject content = fromServiceReader.readObject();
-            /* Save the probeid*/
+            /* Save the id*/
             createdProbeId =
                 content.getJsonObject("data").getJsonNumber("id").intValue();
             prot.addInfo("probeId", createdProbeId);
@@ -243,7 +256,7 @@
             WebTarget target =
                 client.target(baseUrl + "probe/" + createdProbeId);
             prot.addInfo("probeId", createdProbeId);
-            /* Request a probe with the id saved when created a probe*/
+            /* Request a with the saved id*/
             Response response = target.request().get();
             String entity = response.readEntity(String.class);
             /* Try to parse the response*/
diff -r 8d703ac5ad65 -r 1c8061b90b41 src/test/java/de/intevation/lada/test/Query.java
--- a/src/test/java/de/intevation/lada/test/Query.java	Tue Feb 17 16:44:53 2015 +0100
+++ b/src/test/java/de/intevation/lada/test/Query.java	Tue Feb 17 17:04:13 2015 +0100
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.test;
 
 import java.io.StringReader;
@@ -17,12 +24,18 @@
 
 import de.intevation.lada.Protocol;
 
+
+/**
+ * Class containing test cases for query config.
+ *
+ * @author <a href="mailto:rrenkert at intevation.de">Raimund Renkert</a>
+ */
 public class Query {
 
     private List<Protocol> protocol;
 
     /**
-     * @return the protocol
+     * @return The test protocol
      */
     public List<Protocol> getProtocol() {
         return protocol;


More information about the Lada-commits mailing list