Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Apr 19, 2024
1 parent d6f8b90 commit 9a9ddbc
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/testthat/test-bm_extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ test_that("Query VNP46A1", {
roi_sf <- geodata::gadm(country = "CHE", level = 0, path = tempdir())

# Daily data
r <- bm_extract(roi_sf = roi_sf,
ntl_df <- bm_extract(roi_sf = roi_sf,
product_id = "VNP46A1",
date = "2021-10-03",
bearer = bearer)

expect_true(class(r) == "SpatRaster",
info = "r is not a SpatRaster object"
expect_true(class(ntl_df)[1] == "tbl_df",
info = "r is not a tibble"
)

})
Expand All @@ -27,13 +27,13 @@ test_that("Query VNP46A2", {
roi_sf <- geodata::gadm(country = "CHE", level = 0, path = tempdir())

# Daily data
r <- bm_extract(roi_sf = roi_sf,
ntl_df <- bm_extract(roi_sf = roi_sf,
product_id = "VNP46A2",
date = "2021-10-03",
bearer = bearer)

expect_true(class(r) == "SpatRaster",
info = "r is not a SpatRaster object"
expect_true(class(ntl_df)[1] == "tbl_df",
info = "r is not a tibble"
)

})
Expand All @@ -47,13 +47,13 @@ test_that("Query VNP46A3", {
roi_sf <- geodata::gadm(country = "CHE", level = 0, path = tempdir())

# Daily data
r <- bm_extract(roi_sf = roi_sf,
ntl_df <- bm_extract(roi_sf = roi_sf,
product_id = "VNP46A3",
date = "2021-10",
bearer = bearer)

expect_true(class(r) == "SpatRaster",
info = "r is not a SpatRaster object"
expect_true(class(ntl_df)[1] == "tbl_df",
info = "r is not a tibble"
)

})
Expand All @@ -67,13 +67,13 @@ test_that("Query VNP46A4", {
roi_sf <- geodata::gadm(country = "CHE", level = 0, path = tempdir())

# Daily data
r <- bm_extract(roi_sf = roi_sf,
ntl_df <- bm_extract(roi_sf = roi_sf,
product_id = "VNP46A4",
date = 2021,
bearer = bearer)

expect_true(class(r) == "SpatRaster",
info = "r is not a SpatRaster object"
expect_true(class(ntl_df)[1] == "tbl_df",
info = "r is not a tibble"
)

})
Expand Down

0 comments on commit 9a9ddbc

Please sign in to comment.