tests/testthat/test-function-download_daily_grids_germany.R

test_that("download_daily_grids_germany() works", {

  f <- kwb.dwd:::download_daily_grids_germany

  expect_error(f())
  expect_error(f("x"))

  capture.output(result <- f("evapo_p", quiet = TRUE))

  expect_type(result, "character")
  expect_true(all(sapply(result, file.exists)))
  expect_true(all(endsWith(result, ".asc")))
})
KWB-R/kwb.dwd documentation built on Sept. 28, 2022, 6:03 p.m.