Skip to content

Commit

Permalink
Use style instead of operative field as operative doesn't tell anythi…
Browse files Browse the repository at this point in the history
…ng...
  • Loading branch information
optionsome committed Mar 17, 2023
1 parent c992859 commit a05761f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/ext-test/resources/smoovebikerental/smoove.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name" : "A04 Hamn",
"operative" : true,
"coordinates" : "60.167913, 24.952269",
"style" : "",
"style" : "Station on",
"avl_bikes" : 1,
"free_slots" : 11,
"total_slots" : 12
Expand All @@ -13,7 +13,7 @@
"name" : "B05 Fake",
"operative" : false,
"coordinates" : "60, 24",
"style" : "",
"style" : "Station off",
"avl_bikes" : 5,
"free_slots" : 5,
"total_slots" : 5
Expand All @@ -22,7 +22,7 @@
"name" : "B06 Foo",
"operative" : true,
"coordinates" : "61,25",
"style" : "",
"style" : "Station on",
"avl_bikes" : 5,
"free_slots" : 5,
"total_slots" : 5
Expand All @@ -31,7 +31,7 @@
"name" : "B08 Invalid",
"operative" : true,
"coordinates" : "",
"style" : "",
"style" : "Station on",
"avl_bikes" : 5,
"free_slots" : 5,
"total_slots" : 5
Expand All @@ -40,7 +40,7 @@
"name" : "B09 Full",
"operative" : true,
"coordinates" : "60.168913, 24.953269",
"style" : "",
"style" : "Station on",
"avl_bikes" : 12,
"free_slots" : 0,
"total_slots" : 12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected VehicleRentalStation parseElement(JsonNode node) {
log.warn("Error parsing bike rental station {}", station.id, e);
return null;
}
if (!node.path("operative").asText().equals("true")) {
if (!node.path("style").asText().equals("Station on")) {
station.isRenting = false;
station.isReturning = false;
station.vehiclesAvailable = 0;
Expand Down

0 comments on commit a05761f

Please sign in to comment.