Skip to content

Commit

Permalink
#9 more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Feb 25, 2022
1 parent 66bd7e4 commit 4834fcf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/testthat/test_WCSClient_v2_0.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ test_that("WCS 2.0.1 - Rasdaman",{
expect_is(temp4d_desc$domainSet, "GMLReferenceableGridByVectors")
})

test_that("WCS 2.0.1 - Rasdaman - Spatio-Temporal Coverages",{
testthat::skip_on_cran()
wcs <- WCSClient$new("https://ows.rasdaman.org/rasdaman/ows", "2.0.1", logger = "DEBUG")

#AverageChlorophyllScaled
chla <- wcs$getCapabilities()$findCoverageSummaryById("AverageChloroColorScaled", T)
chla_des <- chla$getDescription()
expect_is(chla_des, "WCSCoverageDescription")
chla_dims <- chla$getDimensions()
expect_is(chla_dims, "list")
expect_equal(length(chla_dims), 3L)
chla_stack <- chla$getCoverageStack(
bbox = OWSUtils$toBBOX(-10, -9, 40, 42),
time = tail(chla_dims[[1]]$coefficients,5)
)
})

#DATASOURCES OF INTEREST

test_that("WCS 2.0.1 - Emodnet Bathymetry",{
Expand Down
19 changes: 19 additions & 0 deletions tests/testthat/test_WCSClient_v2_1_0.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require(testthat)
context("WCS")

test_that("WCS 2.1.0 - Rasdaman",{
testthat::skip_on_cran()
wcs <- WCSClient$new("https://ows.rasdaman.org/rasdaman/ows", "2.1.0", logger = "DEBUG")
expect_is(wcs, "WCSClient")
caps <- wcs$getCapabilities()
Expand All @@ -26,3 +27,21 @@ test_that("WCS 2.1.0 - Rasdaman",{
expect_is(temp4d_desc, "WCSCoverageDescription")
expect_is(temp4d_desc$domainSet, "GMLReferenceableGridByVectors")
})

test_that("WCS 2.1.0 - Rasdaman - Spatio-Temporal Coverages",{
testthat::skip_on_cran()
wcs <- WCSClient$new("https://ows.rasdaman.org/rasdaman/ows", "2.1.0", logger = "DEBUG")

#AverageChlorophyllScaled
chla <- wcs$getCapabilities()$findCoverageSummaryById("AverageChloroColorScaled", T)
chla_des <- chla$getDescription()
expect_is(chla_des, "WCSCoverageDescription")
chla_dims <- chla$getDimensions()
expect_is(chla_dims, "list")
expect_equal(length(chla_dims), 3L)
chla_stack <- chla$getCoverageStack(
bbox = OWSUtils$toBBOX(-10, -9, 40, 42),
time = tail(chla_dims[[1]]$coefficients,5)
)
})

0 comments on commit 4834fcf

Please sign in to comment.