tests/testthat/test-get_cultivars_param.R

stics_version <- get_stics_versions_compat()$latest_version

xml_plant <- file.path(
  get_examples_path("xml", stics_version = stics_version),
  "file_plt.xml"
)

cv_param_df <- get_cultivars_param(file = xml_plant)

context("Getting returned type")
test_that("type, data.frame", {
  expect_is(cv_param_df, "data.frame")
})

context("Checking presence of row names")
test_that("rownames", {
  expect_identical(!is.null(rownames(cv_param_df)), TRUE)
})
SticsRPacks/SticsRFiles documentation built on July 4, 2025, 4:19 p.m.