Intro

Because functions give outputs as plots, unit testing would not work; manually testing each function instead.

Query 4

Expect success

?query4
query4()
query4(start = "05-22-2020", end = "06-22-2020")
query4(start = c("new_cases" = 10000), end = c("new_vaccinations" = 100))
query4(var = "new_deaths")
query4(var = "new_vaccinations")
query4(func = "mean")
query4(var = "new_deaths", func = "median")
query4(var = "new_vaccinations", func = "max")
query4(projection = "gilbert", func = "min")
query4(plot_type = "dynamic")
query4(plot_type = "dynamic", start = c("new_deaths" = 1000), end = c("new_cases" = 10000))
query4(plot_type = "dynamic", start = "07-27-2020", end = "08-28-2020", var = "new_deaths", func = "median", projection = "globular")
query4(palette = "Greys")
query4(plot_type = "dynamic", palette = "BuPu")

Expect failure

query4(plot_type = 2)
query4(start = "null")
query4(end = "end")
query4(start = "2020")
query4(start = c("new_variable" = 100))
query4(end = c("new_end" = 10))
query4(end = "01-01-2005")
query4(func = "func")
query4(projection = "new_proj")
query4(palette = "boston housing")


tomzhang255/covidviz documentation built on May 15, 2022, 6:59 a.m.