test: calcDeliveryPathByGeoJson

This commit is contained in:
js0ny 2025-11-28 03:45:06 +00:00
parent 449c81a375
commit 72eb53817c
9 changed files with 222 additions and 5 deletions

View file

@ -0,0 +1,39 @@
meta {
name: Bypass Bayes Centre
type: http
seq: 10
}
post {
url: {{API_BASE}}/calcDeliveryPathAsGeoJson
body: json
auth: inherit
}
body:json {
[
{
"id": 123,
"date": "2025-12-22",
"time": "14:30",
"requirements": {
"capacity": 0.75,
"heating": true,
"maxCost": 13.5
},
"delivery": {
"lng": -3.187543601324762,
"lat":55.94524469728245
}
}
]
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,39 @@
meta {
name: Bypass RestrictedArea
type: http
seq: 9
}
post {
url: {{API_BASE}}/calcDeliveryPathAsGeoJson
body: json
auth: inherit
}
body:json {
[
{
"id": 123,
"date": "2025-12-22",
"time": "14:30",
"requirements": {
"capacity": 0.75,
"heating": true,
"maxCost": 13.5
},
"delivery": {
"lng": -3.1878363275002357,
"lat":55.94302147870653
}
}
]
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,39 @@
meta {
name: From Appleton Tower
type: http
seq: 6
}
post {
url: {{API_BASE}}/calcDeliveryPathAsGeoJson
body: json
auth: inherit
}
body:json {
[
{
"id": 123,
"date": "2025-12-22",
"time": "14:30",
"requirements": {
"capacity": 0.75,
"heating": true,
"maxCost": 13.5
},
"delivery": {
"lng": -3.186979243145231,
"lat":55.94230336036327
}
}
]
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -1,7 +1,7 @@
meta { meta {
name: Complex copy copy name: Simple: Path
type: http type: http
seq: 5 seq: 4
} }
post { post {

View file

@ -1,5 +1,5 @@
meta { meta {
name: Complex copy name: Simple
type: http type: http
seq: 4 seq: 4
} }

View file

@ -0,0 +1,53 @@
meta {
name: Two Points from two service points
type: http
seq: 8
}
post {
url: {{API_BASE}}/calcDeliveryPathAsGeoJson
body: json
auth: inherit
}
body:json {
[
{
"id": 123,
"date": "2025-12-22",
"time": "14:30",
"requirements": {
"capacity": 0.75,
"heating": true,
"maxCost": 13.5
},
"delivery": {
"lng": -3.1878363275002357,
"lat":55.94302147870653
}
},
{
"id": 456,
"date": "2025-12-25",
"time": "11:30",
"requirements": {
"capacity": 0.75,
"heating": true,
"maxCost": 13.5
},
"delivery": {
"lng": -3.187986659939753,
"lat": 55.97157210129231
}
}
]
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,39 @@
meta {
name: [400] DeliveryPoint in RestrictedArea
type: http
seq: 7
}
post {
url: {{API_BASE}}/calcDeliveryPathAsGeoJson
body: json
auth: inherit
}
body:json {
[
{
"id": 123,
"date": "2025-12-22",
"time": "14:30",
"requirements": {
"capacity": 0.75,
"heating": true,
"maxCost": 13.5
},
"delivery": {
"lng": -3.188779987281663,
"lat": 55.943652825016414
}
}
]
}
assert {
res.status: eq 400
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,8 @@
meta {
name: [POST] calcDeliveryPath(AsGeoJson)
seq: 7
}
auth {
mode: inherit
}

View file

@ -18,8 +18,8 @@ public class GeoJsonDataController {
this.droneInfoService = droneInfoService; this.droneInfoService = droneInfoService;
} }
@GetMapping("/getRestrictedAreaByGeoJson") @GetMapping("/getAllRestrictedAreaByGeoJson")
public String getRestrictedAreaGeoJson() throws JsonProcessingException { public String getAllRestrictedAreaGeoJson() throws JsonProcessingException {
return droneInfoService.fetchRestrictedAreasInGeoJson().stream().reduce("", String::concat); return droneInfoService.fetchRestrictedAreasInGeoJson().stream().reduce("", String::concat);
} }
} }