add: test with parameters
update: names of tests
This commit is contained in:
parent
d0578a5a8e
commit
335cc78005
@ -23,12 +23,20 @@ public class CardsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getCardsWithInvalidIDShouldReturnErrorNotFound(){
|
public void getCardsWithInvalidPathShouldReturnErrorNotFound(){
|
||||||
given().pathParam("id", 0).get("/{id}").then().statusCode(404);
|
given().pathParam("id", 0).get("/{id}").then().statusCode(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@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(
|
Map<Integer, String> expectedNames = Map.of(
|
||||||
1, "Ankh of Mishra",
|
1, "Ankh of Mishra",
|
||||||
2, "Basalt Monolith",
|
2, "Basalt Monolith",
|
||||||
|
Loading…
Reference in New Issue
Block a user