[Lada-commits] [PATCH 2 of 3] Avoid duplicate entries in interface tests

Wald Commits scm-commit at wald.intevation.org
Tue Jun 14 18:34:55 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1465921889 -7200
# Node ID 1a3a3996e072e0f8592c07ed8b44e5000af66a6b
# Parent  aba3a5384c69e4ee5222e3075f8cac549a42a7b5
Avoid duplicate entries in interface tests.

diff -r aba3a5384c69 -r 1a3a3996e072 src/test/java/de/intevation/lada/test/stamm/OrtTest.java
--- a/src/test/java/de/intevation/lada/test/stamm/OrtTest.java	Tue Jun 14 18:30:41 2016 +0200
+++ b/src/test/java/de/intevation/lada/test/stamm/OrtTest.java	Tue Jun 14 18:31:29 2016 +0200
@@ -56,8 +56,10 @@
     public final void execute() {
         getAll("ort", "rest/ort");
         getById("ort", "rest/ort/1000", expectedById);
-        update("ort", "rest/ort/1000", "langtext", "Langer Text", "Längerer Text");
-        JsonObject created = create("ort", "rest/ort", create);
-        delete("ort", "rest/ort/" + created.getJsonObject("data").get("id"));
+        int createdId = create("ort", "rest/ort", create)
+            .getJsonObject("data").getInt("id");
+        update("ort", "rest/ort/" + createdId,
+            "langtext", "Langer Text", "Längerer Text");
+        delete("ort", "rest/ort/" + createdId);
     }
 }
diff -r aba3a5384c69 -r 1a3a3996e072 src/test/resources/datasets/datensatzerzeuger.json
--- a/src/test/resources/datasets/datensatzerzeuger.json	Tue Jun 14 18:30:41 2016 +0200
+++ b/src/test/resources/datasets/datensatzerzeuger.json	Tue Jun 14 18:31:29 2016 +0200
@@ -1,5 +1,5 @@
 {
-    "daErzeugerId": "06",
+    "daErzeugerId": "07",
     "letzteAenderung": 1381413048800,
     "mstId": "06010",
     "bezeichnung": "Test 1",
diff -r aba3a5384c69 -r 1a3a3996e072 src/test/resources/datasets/ort.json
--- a/src/test/resources/datasets/ort.json	Tue Jun 14 18:30:41 2016 +0200
+++ b/src/test/resources/datasets/ort.json	Tue Jun 14 18:31:29 2016 +0200
@@ -1,6 +1,6 @@
 {
     "netzbetreiberId": "06",
-    "ortId": "D_ 00191",
+    "ortId": "D_ 00192",
     "langtext": "Langer Text",
     "staatId": 0,
     "gemId": "11000000",


More information about the Lada-commits mailing list