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;