-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More unit tests - cover more use cases (#1761)
More unit tests to cover more use cases
- Loading branch information
Showing
9 changed files
with
1,420 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
286 changes: 286 additions & 0 deletions
286
...mestamp_1589486400000_endingTimestamp_1589659200000_station_230_239_page_0_size_1000.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,286 @@ | ||
{ | ||
"_embedded": { | ||
"dailies": [ | ||
{ | ||
"id": "dae7f61d-fa45-4f3f-b88e-25d8bb996fc0", | ||
"createdBy": "SYBRAND", | ||
"lastEntityUpdateTimestamp": 1590192000000, | ||
"updateDate": "2020-05-22T17:00:00.000+0000", | ||
"lastModifiedBy": "CVANEATO", | ||
"archive": false, | ||
"startIndices": false, | ||
"station": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"stationId": "bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"weatherTimestamp": 1589486400000, | ||
"temperature": 23.0, | ||
"temperatureMin": null, | ||
"temperatureMax": null, | ||
"relativeHumidity": 36.0, | ||
"relativeHumidityMin": null, | ||
"relativeHumidityMax": null, | ||
"windSpeed": 7.0, | ||
"precipitation": 1.8, | ||
"dangerForest": 3, | ||
"dangerGrassland": 1, | ||
"dangerScrub": 5, | ||
"recordType": { | ||
"id": "FORECAST", | ||
"displayLabel": "Forecast", | ||
"displayOrder": 2, | ||
"createdBy": "DATA_LOAD", | ||
"lastModifiedBy": "DATA_LOAD" | ||
}, | ||
"windDirection": 300.0, | ||
"fineFuelMoistureCode": 84.294, | ||
"duffMoistureCode": 79.937, | ||
"droughtCode": 463.498, | ||
"initialSpreadIndex": 2.724, | ||
"buildUpIndex": 111.71, | ||
"fireWeatherIndex": 12.966, | ||
"dailySeverityRating": null, | ||
"grasslandCuring": null, | ||
"observationValidInd": true, | ||
"observationValidComment": null, | ||
"missingHourlyData": null, | ||
"previousState": null, | ||
"businessKey": "1627329600000-bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"_links": { | ||
"self": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"daily": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"station": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "dae7f61d-fa45-4f3f-b88e-25d8bb996fc0", | ||
"createdBy": "SYBRAND", | ||
"lastEntityUpdateTimestamp": 1590192000000, | ||
"updateDate": "2020-05-22T17:00:00.000+0000", | ||
"lastModifiedBy": "CVANEATO", | ||
"archive": false, | ||
"startIndices": false, | ||
"station": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"stationId": "bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"weatherTimestamp": 1589659200000, | ||
"temperature": 21.0, | ||
"temperatureMin": null, | ||
"temperatureMax": null, | ||
"relativeHumidity": 34.0, | ||
"relativeHumidityMin": null, | ||
"relativeHumidityMax": null, | ||
"windSpeed": 5.0, | ||
"precipitation": 0.8, | ||
"dangerForest": 2, | ||
"dangerGrassland": 0, | ||
"dangerScrub": 4, | ||
"recordType": { | ||
"id": "FORECAST", | ||
"displayLabel": "Forecast", | ||
"displayOrder": 2, | ||
"createdBy": "DATA_LOAD", | ||
"lastModifiedBy": "DATA_LOAD" | ||
}, | ||
"windDirection": 200.0, | ||
"fineFuelMoistureCode": 54.294, | ||
"duffMoistureCode": 59.937, | ||
"droughtCode": 363.498, | ||
"initialSpreadIndex": 1.724, | ||
"buildUpIndex": 11.71, | ||
"fireWeatherIndex": 2.966, | ||
"dailySeverityRating": null, | ||
"grasslandCuring": null, | ||
"observationValidInd": true, | ||
"observationValidComment": null, | ||
"missingHourlyData": null, | ||
"previousState": null, | ||
"businessKey": "1627329600000-bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"_links": { | ||
"self": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"daily": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"station": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "aae7f61d-fa45-4f3f-b88e-25d8bb996fc0", | ||
"createdBy": "SYBRAND", | ||
"lastEntityUpdateTimestamp": 1590192000000, | ||
"updateDate": "2020-05-22T17:00:00.000+0000", | ||
"lastModifiedBy": "CVANEATO", | ||
"archive": false, | ||
"startIndices": false, | ||
"station": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"stationId": "bfe0a6e2-e286-0210-e053-259e228e58c7", | ||
"weatherTimestamp": 1589486400000, | ||
"temperature": 23.0, | ||
"temperatureMin": null, | ||
"temperatureMax": null, | ||
"relativeHumidity": 36.0, | ||
"relativeHumidityMin": null, | ||
"relativeHumidityMax": null, | ||
"windSpeed": 7.0, | ||
"precipitation": 1.8, | ||
"dangerForest": 3, | ||
"dangerGrassland": 1, | ||
"dangerScrub": 5, | ||
"recordType": { | ||
"id": "FORECAST", | ||
"displayLabel": "Forecast", | ||
"displayOrder": 2, | ||
"createdBy": "DATA_LOAD", | ||
"lastModifiedBy": "DATA_LOAD" | ||
}, | ||
"windDirection": 300.0, | ||
"fineFuelMoistureCode": 84.294, | ||
"duffMoistureCode": 79.937, | ||
"droughtCode": 463.498, | ||
"initialSpreadIndex": 2.724, | ||
"buildUpIndex": 111.71, | ||
"fireWeatherIndex": 12.966, | ||
"dailySeverityRating": null, | ||
"grasslandCuring": null, | ||
"observationValidInd": true, | ||
"observationValidComment": null, | ||
"missingHourlyData": null, | ||
"previousState": null, | ||
"businessKey": "1627329600000-bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"_links": { | ||
"self": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"daily": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"station": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "aae7f61d-fa45-4f3f-b88e-25d8bb996fc0", | ||
"createdBy": "SYBRAND", | ||
"lastEntityUpdateTimestamp": 1590192000000, | ||
"updateDate": "2020-05-22T17:00:00.000+0000", | ||
"lastModifiedBy": "CVANEATO", | ||
"archive": false, | ||
"startIndices": false, | ||
"station": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"stationId": "bfe0a6e2-e286-0210-e053-259e228e58c7", | ||
"weatherTimestamp": 1589572800000, | ||
"temperature": 3.0, | ||
"temperatureMin": null, | ||
"temperatureMax": null, | ||
"relativeHumidity": 6.0, | ||
"relativeHumidityMin": null, | ||
"relativeHumidityMax": null, | ||
"windSpeed": 1.0, | ||
"precipitation": 0.8, | ||
"dangerForest": 2, | ||
"dangerGrassland": 2, | ||
"dangerScrub": 2, | ||
"recordType": { | ||
"id": "FORECAST", | ||
"displayLabel": "Forecast", | ||
"displayOrder": 2, | ||
"createdBy": "DATA_LOAD", | ||
"lastModifiedBy": "DATA_LOAD" | ||
}, | ||
"windDirection": 320.0, | ||
"fineFuelMoistureCode": 94.294, | ||
"duffMoistureCode": 89.937, | ||
"droughtCode": 473.498, | ||
"initialSpreadIndex": 3.724, | ||
"buildUpIndex": 121.71, | ||
"fireWeatherIndex": 13.866, | ||
"dailySeverityRating": null, | ||
"grasslandCuring": null, | ||
"observationValidInd": true, | ||
"observationValidComment": null, | ||
"missingHourlyData": null, | ||
"previousState": null, | ||
"businessKey": "1627329600000-bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"_links": { | ||
"self": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"daily": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"station": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "aae7f61d-fa45-4f3f-b88e-25d8bb996fc0", | ||
"createdBy": "SYBRAND", | ||
"lastEntityUpdateTimestamp": 1590192000000, | ||
"updateDate": "2020-05-22T17:00:00.000+0000", | ||
"lastModifiedBy": "CVANEATO", | ||
"archive": false, | ||
"startIndices": false, | ||
"station": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"stationId": "bfe0a6e2-e286-0210-e053-259e228e58c7", | ||
"weatherTimestamp": 1589659200000, | ||
"temperature": 13.0, | ||
"temperatureMin": null, | ||
"temperatureMax": null, | ||
"relativeHumidity": 13.0, | ||
"relativeHumidityMin": null, | ||
"relativeHumidityMax": null, | ||
"windSpeed": 2.3, | ||
"precipitation": 0.2, | ||
"dangerForest": 2, | ||
"dangerGrassland": 2, | ||
"dangerScrub": 3, | ||
"recordType": { | ||
"id": "FORECAST", | ||
"displayLabel": "Forecast", | ||
"displayOrder": 2, | ||
"createdBy": "DATA_LOAD", | ||
"lastModifiedBy": "DATA_LOAD" | ||
}, | ||
"windDirection": 120.0, | ||
"fineFuelMoistureCode": 14.294, | ||
"duffMoistureCode": 39.937, | ||
"droughtCode": 233.498, | ||
"initialSpreadIndex": 1.123, | ||
"buildUpIndex": 101.71, | ||
"fireWeatherIndex": 10.966, | ||
"dailySeverityRating": null, | ||
"grasslandCuring": null, | ||
"observationValidInd": true, | ||
"observationValidComment": null, | ||
"missingHourlyData": null, | ||
"previousState": null, | ||
"businessKey": "1627329600000-bfe0a6e2-e27e-0210-e053-259e228e58c7", | ||
"_links": { | ||
"self": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"daily": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/dae7f61d-fa45-4f3f-b88e-25d8bb996fc0" | ||
}, | ||
"station": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/bfe0a6e2-e27e-0210-e053-259e228e58c7" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"_links": { | ||
"self": { | ||
"href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/dailies/search/findDailiesByStationIdIsInAndWeatherTimestampBetweenOrderByStationIdAscWeatherTimestampAsc?startingTimestamp=1627329600000&endingTimestamp=1627329600000&stationIds=bfe0a6e2-e27e-0210-e053-259e228e58c7&page=0&size=10" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
api/app/tests/hfi/test_hfi_endpoint_request_1_of_2_stations_selected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"start_date": "2020-05-21", | ||
"end_date": "2020-05-23", | ||
"planning_area_station_info": { | ||
"1": [ | ||
{ | ||
"station_code": 230, | ||
"selected": true, | ||
"fuel_type_id": 1 | ||
} | ||
], | ||
"2": [ | ||
{ | ||
"station_code": 239, | ||
"selected": true, | ||
"fuel_type_id": 2 | ||
} | ||
] | ||
}, | ||
"selected_station_code_ids": [ | ||
230 | ||
], | ||
"selected_fire_center_id": 1, | ||
"planning_area_fire_starts": {}, | ||
"persist_request": true | ||
} |
Oops, something went wrong.