Skip to content

Commit

Permalink
feat(impl): [#528] add step definition for cucumber tests for validat…
Browse files Browse the repository at this point in the history
…ing error response message
  • Loading branch information
dsmf committed May 10, 2024
1 parent f88f916 commit 4db48e9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ public void theCreatePolicyResponseShouldHaveStatus(final int httpStatus) {
this.createPoliciesResponse.statusCode(httpStatus);
}

@Then("the create policy response should have message containing {string}")
public void theCreatePolicyResponseShouldHaveMessageContaining(final String string) {
this.createPoliciesResponse.body("messages", Matchers.hasItem(Matchers.containsString(string)));
}

@Then("the update policy response should have HTTP status {int}")
public void theUpdatePolicyResponseShouldHaveStatus(final int httpStatus) {
this.updatePoliciesResponse.statusCode(httpStatus);
Expand Down

0 comments on commit 4db48e9

Please sign in to comment.