Mercurial > lada > lada-server
changeset 978:1a3a3996e072
Avoid duplicate entries in interface tests.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 14 Jun 2016 18:31:29 +0200 |
parents | aba3a5384c69 |
children | 7a6985fbb3c8 |
files | src/test/java/de/intevation/lada/test/stamm/OrtTest.java src/test/resources/datasets/datensatzerzeuger.json src/test/resources/datasets/ort.json |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }
--- 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",