Closed llnelson closed 5 years ago
testthat operations generally expect an 'atomic' level for responses... Challenging to test complex data frames returned by Toolkit functions. Can do the component tests like getBBox(), getStationSubtype(), stripEscapes(), getUSHCN(), getAOAFeature(), format*(), etc...
Priority test targets: getBBox(), getStationSubtype(), getUSHCN(), getAOAFeature(), format*(). Challenge will be specifying appropriate parameter format... Combine with stopifnot() logic.
For master function tests (findStation, etc): check variable count, check variable type/content as analogs for DF structure.
Added initial test suite focussed on metric requests: test-findStation, test-getWxObservations, test-getWxObservationsDerivedMetrics, test-getStationMetrics, test-getGrids*, and test-getMetricGrids. Run tests in RStudio using Build --> Test Package or via individual test files using test_file(fName)
ToDo: generi-size findStation and getWxObservation tests.
Merged testdev into dev. Closing issue.
Doc