From 0a6c824d4c2a31a6d1c19bb314e8940f766f2938 Mon Sep 17 00:00:00 2001 From: Valeria Bolshakova Date: Wed, 1 Nov 2017 15:45:51 +0300 Subject: [PATCH] =?UTF-8?q?COM-19=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D1=83?= =?UTF-8?q?=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ru/bsc/test/at/executor/service/AtExecutor.java | 4 ++++ .../bsc/test/at/executor/validation/IgnoringComparator.java | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/bsc/test/at/executor/service/AtExecutor.java b/src/main/java/ru/bsc/test/at/executor/service/AtExecutor.java index 4e0ab80b..ca284b4d 100644 --- a/src/main/java/ru/bsc/test/at/executor/service/AtExecutor.java +++ b/src/main/java/ru/bsc/test/at/executor/service/AtExecutor.java @@ -258,6 +258,10 @@ private void executeTestStep(WireMockAdmin wireMockAdmin, Connection connection, // 4.1 Проверить сохраненные значения for(Map.Entry entry: step.getSavedValuesCheck().entrySet()) { String valueExpected = entry.getValue() == null ? "" : entry.getValue(); + for (Map.Entry savedVal : savedValues.entrySet()) { + String key = String.format("%%%s%%", savedVal.getKey()); + valueExpected = valueExpected.replaceAll(key, savedVal.getValue()); + } String valueActual = savedValues.get(entry.getKey()); if (!valueExpected.equals(valueActual)) { throw new Exception("Saved value " + entry.getKey() + " = " + valueActual + ". Expected: " + valueExpected); diff --git a/src/main/java/ru/bsc/test/at/executor/validation/IgnoringComparator.java b/src/main/java/ru/bsc/test/at/executor/validation/IgnoringComparator.java index 9d46fb9c..8e89b672 100644 --- a/src/main/java/ru/bsc/test/at/executor/validation/IgnoringComparator.java +++ b/src/main/java/ru/bsc/test/at/executor/validation/IgnoringComparator.java @@ -1,7 +1,6 @@ package ru.bsc.test.at.executor.validation; import org.json.JSONException; -import org.json.JSONObject; import org.skyscreamer.jsonassert.JSONCompareMode; import org.skyscreamer.jsonassert.JSONCompareResult; import org.skyscreamer.jsonassert.comparator.DefaultComparator;