Intro

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

Query 6

Expect success

?query6
query6()
query6(plot_type = "static", x = "new_vaccinations", y = "new_deaths", country = "Canada",
       start = "07-01-2021", end = "12-01-2021")
query6(plot_type = "static", x = "new_vaccinations", y = "new_deaths", country = "Canada",
       start = "07-01-2021", end = "12-01-2021", use_bins = TRUE)
query6(plot_type = "dynamic", x = "new_vaccinations", y = "new_deaths", country = "Canada",
       start = "07-01-2021", end = "12-01-2021")
query6(plot_type = "dynamic", x = "new_vaccinations", y = "new_deaths", country = "Canada",
       start = "07-01-2021", end = "12-01-2021", use_bins = TRUE)
query6(plot_type = "static", x = "new_vaccinations", y = "new_deaths",
       country = c("Canada", "United States", "Mexico"),
       start = "07-01-2021", end = "12-01-2021")
query6(plot_type = "static", x = "new_vaccinations", y = "new_deaths",
       country = c("Canada", "United States", "Mexico"),
       start = "07-01-2021", end = "12-01-2021", use_bins = TRUE)
query6(plot_type = "dynamic", x = "new_vaccinations", y = "new_deaths",
       country = c("Canada", "United States", "Mexico"),
       start = "07-01-2021", end = "12-01-2021")

Expect failure

query6(plot_type = "invalid")
query6(x = "na")
query6(y = "species")
query6(country = "California")
query6(start = "a date")
query6(end = "2020/03/02")
query6(use_bins = 1)


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