-
Notifications
You must be signed in to change notification settings - Fork 2
5. Samples with test Cases
Sanjoy Kumer Deb edited this page Oct 12, 2017
·
10 revisions
Happy path test samples:
-
Create Place:
Description : Add Place with all valid field.It should return a integer Id in plain format.
- Request:
{
"name":"Comilla",
"code":"CML",
"latitude":23.46232,
"longitude":91.188435
}
- Response
50
-
Create Path:
Description : Add Path with all valid field.It should return a integer Id in plain format.
- Request:
{
"name":"Comilla",
"code":"CML",
"latitude":23.46232,
"longitude":91.188435
}
- Response
50
-
Find Path Example
Description : This request used to find all possible path from source to destination.
- Request
{
"source": "Stockholm",
"destination": "Orlando",
"modeOfTransports": ["Ocean", "Road"],
"containerSize": 20,
"durationFrom": 20,
"durationTo": 25,
"costFrom": 2500,
"costTo": 4000
}
- Response
{
"results": [
{
"route": [
{
"from": "Stockholm",
"to": "Gothenburg",
"transportType": "Road",
"cost": 420,
"duration": 1
},
{
"from": "Gothenburg",
"to": "Savannah",
"transportType": "Ocean",
"cost": 1765,
"duration": 23
},
{
"from": "Savannah",
"to": "Orlando",
"transportType": "Road",
"cost": 600,
"duration": 1
}
],
"totalCost": 2785,
"totalDuration": 25
},
{
"route": [
{
"from": "Stockholm",
"to": "Gothenburg",
"transportType": "Road",
"cost": 420,
"duration": 1
},
{
"from": "Gothenburg",
"to": "Ft. Lauderdale",
"transportType": "Ocean",
"cost": 1623,
"duration": 22
},
{
"from": "Ft. Lauderdale",
"to": "Orlando",
"transportType": "Road",
"cost": 600,
"duration": 1
}
],
"totalCost": 2643,
"totalDuration": 24
},
{
"route": [
{
"from": "Stockholm",
"to": "Rotterdam",
"transportType": "Road",
"cost": 1430,
"duration": 3
},
{
"from": "Rotterdam",
"to": "Ft. Lauderdale",
"transportType": "Ocean",
"cost": 1623,
"duration": 18
},
{
"from": "Ft. Lauderdale",
"to": "Orlando",
"transportType": "Road",
"cost": 600,
"duration": 1
}
],
"totalCost": 3653,
"totalDuration": 22
}
]
}