Skip to content

Commit 6858924

Browse files
committed
Rename methods
1 parent ece42ca commit 6858924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static void makeRequest(String requestType, String endpoint) {
5959
}
6060

6161
@When("^I make a (GET|DELETE) request to the (Posts|Comments|Albums|Photos|ToDos|Users) endpoint with a path parameter of (-?\\d+)$")
62-
public static void makeRequestWithPathParameter(String requestType, String endpoint, int pathParam) {
62+
public static void makeRequest(String requestType, String endpoint, int pathParam) {
6363
response = requestType.equals("GET") ?
6464
RequestHelpers.sendGetRequestTo(endpoints.get(endpoint) + "/" + pathParam) :
6565
RequestHelpers.sendDeleteRequestTo(endpoints.get(endpoint) + "/" + pathParam);
@@ -93,7 +93,7 @@ public static void makeRequestWithBody(String requestType, String endpoint, Data
9393
}
9494

9595
@When("^I make a (POST|PUT) request with the following body to the (Posts|Comments|Albums|Photos|ToDos|Users) endpoint with a path parameter of (-?\\d+)$")
96-
public static void makeRequestWithEmptyBody(String requestType, String endpoint, int pathParam, DataTable dataTable) {
96+
public static void makeRequestWithBody(String requestType, String endpoint, int pathParam, DataTable dataTable) {
9797
Map<String, String> requestBodyMap = dataTable.subTable(1, 0).asMap(String.class, String.class);
9898
JSONObject requestBody = new JSONObject(requestBodyMap);
9999
response = requestType.equals("POST") ?

0 commit comments

Comments
 (0)