@Test
public void testGetAllUsers(){
given()
.when()
.get("/users")
.then()
.statusCode(200)
}
@Test
public void testCreateUser(){
User user = new User("John", "Doe", 30);
given()
.body(user)
.when()
.post("/users")
.then()
.statusCode(201)
}
@Test
public void testUpdateUser(){
User updatedUser = new User("John", "Smith", 31);
given()
.pathParam("id", 1)
.body(updatedUser)
.when()
.put("/users/{id}")
.then()
.statusCode(200)
}
@Test
public void testUpdateUserName(){
given()
.pathParam("id", 1)
.body("John Doe")
.when()
.patch("/users/{id}/name")
.then()
.statusCode(200)
}
@Test
public void testDeleteUser(){
given()
.pathParam("id", 1)
.when()
.delete("/users/{id}")
.then()
.statusCode(200)
}