Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
add wallet mode removal test
Browse files Browse the repository at this point in the history
  • Loading branch information
gstoehld committed Feb 11, 2022
1 parent 8fe4bba commit 8acf752
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void verificationRulesTest() throws Exception {
boolean modeExists = false;
var iter = expected.get("modeRules").get("activeModes").iterator();
var verifierIter = expected.get("modeRules").get("verifierActiveModes").iterator();
var walletIter = expected.get("modeRules").get("walletActiveModes").iterator();
while (iter.hasNext()) {
JsonNode mode = iter.next();
if (disabledMode.equals(mode.get("id").asText())) {
Expand All @@ -86,6 +87,13 @@ public void verificationRulesTest() throws Exception {
verifierIter.remove();
}
}
while (walletIter.hasNext()) {
JsonNode mode = walletIter.next();
if (disabledMode.equals(mode.get("id").asText())) {
modeExists = true;
walletIter.remove();
}
}
if (!modeExists) {
throw new IllegalArgumentException(
"JSON doesn't seem to have the mode we're testing for. Edit test case or JSON");
Expand Down

0 comments on commit 8acf752

Please sign in to comment.