Skip to content

Commit db4ec52

Browse files
committed
Use regex to match object type
1 parent 03b1e60 commit db4ec52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/typicode/jsonplaceholder/steps/CommonSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static void verifyResponseBodyAgainstExpectedResponse(String expectedResp
9393
assertEquals(json.replace("\r", ""), response.body());
9494
}
9595

96-
@Then("^the response body matches the (\\d+).{2} post in the \"(.*)\" expected response$")
96+
@Then("^the response body matches the (\\d+).{2} (?:post|comment|album|todo|user) in the \"(.*)\" expected response$")
9797
public static void verifyResponseBodyAgainstPartOfExpectedResponse(int index, String expectedResponse) throws IOException {
9898
String filename = EXPECTED_RESPONSES_DIR + expectedResponse.replaceAll(" ", "") + "Response.json";
9999
String json = Files.readString(new File(filename).toPath());

0 commit comments

Comments
 (0)