Skip to content
Snippets Groups Projects
Commit 5e5990a2 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Added unit tests.

parent 14be10a1
No related branches found
No related tags found
1 merge request!85Updates mainly to expose sysdata, but also improvements in readNWISdata and qw.
...@@ -5,13 +5,16 @@ test_that("General NWIS retrievals working", { ...@@ -5,13 +5,16 @@ test_that("General NWIS retrievals working", {
multiSite <- readNWISdata(sites=c("04025500","040263491"), service="iv", multiSite <- readNWISdata(sites=c("04025500","040263491"), service="iv",
parameterCd="00060") parameterCd="00060")
expect_is(multiSite$dateTime, 'POSIXct')
bBoxEx <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010") bBoxEx <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010")
expect_that(length(unique(bBoxEx$site_no)) > 1, is_true())
startDate <- as.Date("2013-10-01") startDate <- as.Date("2013-10-01")
endDate <- as.Date("2014-09-30") endDate <- as.Date("2014-09-30")
waterYear <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010", waterYear <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010",
service="dv", startDate=startDate, endDate=endDate) service="dv", startDate=startDate, endDate=endDate)
expect_is(waterYear$Date, 'Date')
siteInfo <- readNWISdata(stateCd="WI", parameterCd="00010",hasDataTypeCd="iv", siteInfo <- readNWISdata(stateCd="WI", parameterCd="00010",hasDataTypeCd="iv",
service="site") service="site")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment