Skip to content

Commit

Permalink
wip, match pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
manudevelopia committed May 1, 2024
1 parent 8b8d7b3 commit 6b6253b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/info/developia/testing/poc/RequestRunSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ public void validateResult(String name, String value) throws Throwable {
var received = response.getBody().getObject().optString(name);
assert received.equals(value) : "Expected " + value + " but received " + received;
}

@Then("^match (.*)$")
public void matchPattern(String pattern) throws Throwable {
response.getBody();
}
}
1 change: 1 addition & 0 deletions src/test/resources/features/request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Request
When method get
Then status 200
And response id 1
And match { "id": "number"}

Scenario Outline: Get user 1,2,3
Given path /users/<USER_ID>
Expand Down

0 comments on commit 6b6253b

Please sign in to comment.