Skip to content

Commit

Permalink
Merged in COM-19 (pull request #3)
Browse files Browse the repository at this point in the history
COM-19

Approved-by: Stanislav Doroshin <stanislav.doroshin@bsc-ideas.com>
  • Loading branch information
Valeria Bolshakova committed Nov 1, 2017
2 parents 065b360 + 0a6c824 commit d32c27e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/java/ru/bsc/test/at/executor/service/AtExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ private void executeTestStep(WireMockAdmin wireMockAdmin, Connection connection,
// 4.1 Проверить сохраненные значения
for(Map.Entry<String, String> entry: step.getSavedValuesCheck().entrySet()) {
String valueExpected = entry.getValue() == null ? "" : entry.getValue();
for (Map.Entry<String, String> 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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit d32c27e

Please sign in to comment.