tests/testthat/test-summarise_scenarios.R

path <- system.file("testdata", "three4", package = "mm.reoptimise")
scenario_list <- create_scenario_list(path)
summary_tibble <- summarise_scenarios(scenario_list)

# test function
test_that("output a tibble with expected number of rows and columns",{
      expect_true(tibble::is_tibble(summary_tibble))
      expect_equal(length(colnames(summary_tibble)), 4)
      expect_equal(nrow(summary_tibble), length(scenario_list))
})
cath-parkinson/mm.reoptimise documentation built on May 12, 2022, 3:34 p.m.