curl -X GET "http://localhost:PORT/city/calc?source=CityA&destination=CityF&vehicleCode=M"
Valor JSON Esperado:
{
"track": "[CityA, CityB, CityD, CityF]",
"kmValue": "9",
"tollValue": "8",
"fuelValue": "9",
"trackTime (h)": "8"
}
curl -X GET "http://localhost:PORT/city/calc?source=CityB&destination=CityD&vehicleCode=C"
Valor JSON Esperado:
{
"track": "[CityB, CityA, CityC, CityE, CityF, CityD]",
"kmValue": "14",
"tollValue": "4",
"fuelValue": "42",
"trackTime (h)": "17"
}
curl -X GET "http://localhost:PORT/city/calc?source=CityC&destination=CityE&vehicleCode=B"
Valor JSON Esperado:
{
"track": "[CityC, CityA, CityB, CityE]",
"kmValue": "14",
"tollValue": "8",
"fuelValue": "70",
"trackTime (h)": "11"
}
curl -X GET "http://localhost:PORT/city/calc?source=CityD&destination=CityF&vehicleCode=T"
Valor JSON Esperado:
{
"track": "[CityD, CityF]",
"kmValue": "7",
"tollValue": "4",
"fuelValue": "56",
"trackTime (h)": "4"
}
- Substitua "PORT" pela porta em que a sua aplicação está sendo executada.