add: test with parameters

update: names of tests
This commit is contained in:
Szymon Szczubkowski 2024-01-20 23:38:04 +01:00
parent d0578a5a8e
commit 335cc78005

View File

@ -23,12 +23,20 @@ public class CardsTest {
}
@Test
public void getCardsWithInvalidIDShouldReturnErrorNotFound(){
public void getCardsWithInvalidPathShouldReturnErrorNotFound(){
given().pathParam("id", 0).get("/{id}").then().statusCode(404);
}
@Test
public void getCardsWithSpecificIDShouldReturnCorrectData(){
public void getCardsWithParameterShouldReturnCorrectData(){
given().
param("id", "33b9ca30-0296-52b7-a8e2-7d4715404b0d|f592d20b-1974-569e-82ab-aa59f3a66765").
get().then().
header("Count", equalTo("2"));
}
@Test
public void getCardsWithSpecificPathShouldReturnCorrectData(){
Map<Integer, String> expectedNames = Map.of(
1, "Ankh of Mishra",
2, "Basalt Monolith",