tests/testthat/test-get_scenario_description.R

path <- system.file("testdata", "three4", "scenario_0", package = "mm.reoptimise")

# pounds  -> \u00A3
scenario <- create_scenario(path)

test_that("function returns expected string", {
      expect_equal("Month, Profit, \u00A338M",
                   get_scenario_description(scenario, "month", 38000000, "profit"))

      expect_equal("Month, Profit, Best Case",
                   get_scenario_description(scenario, "month", NA, "profit"))
})
cath-parkinson/mm.reoptimise documentation built on May 12, 2022, 3:34 p.m.