I am new to REST-Api testing. i am getting started with Rest-Assured for Rest-Api testing. i am having an issue in my first ever testcase.
The code is as follows:
@Test
public void testGetSingleUser() {
expect().
statusCode(200).
body(
"email", equals("[email protected]"),
"firstName", equals("Tim"),
"lastName", equals("Testerman"),
"id", equals("1")).
when().
get("/service/single-user");
}
In this code the expect().
command is not working. I need to fix this issue quickly and move on.
expectStatusCode()