The goal of this kata is to demonstrate that 100% code coverage is not a sufficient measure to guarantee that we have a safety net that will notify us if we break something.
Run the mutation tests only with the unit tests (without the integration and contract tests) and verify that all the mutants are killed.
mvn clean test pitest:mutationCoverage
-
GET /products
-
GET /products/{productId}
-
GET /users/{userId}/basket
-
POST /users/{userId}/basket
- GET /products
[
{
"id": 1,
"name": "Dell Latitude 3301 Intel Core i7-8565U/8GB/512GB SSD/13.3",
"price": "999,00 €"
},
{
"id": 2,
"name": "Samsonite Airglow Laptop Sleeve 13.3",
"price": "41,34 €"
},
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
},
{
"id": 4,
"name": "Fellowes Mouse Pad Black",
"price": "1,34 €"
}
]
- GET /products/{productId}
{
"product": {
"id": 1,
"name": "Dell Latitude 3301 Intel Core i7-8565U/8GB/512GB SSD/13.3",
"price": "999,00 €"
},
"cross_selling": [
{
"id": 2,
"name": "Samsonite Airglow Laptop Sleeve 13.3",
"price": "41,34 €"
},
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
}
]
}
- GET /users/{userId}/basket
{
"id": 1,
"userId": 1,
"items": {
"products": [
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
}
]
}
}
- POST /users/{userId}/basket
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
}