# WARNING - Generated by {fusen} from dev/flat_economic.Rmd: do not edit by hand # nolint: line_length_linter.

test_that("run_economic_analysis works", {
  scenario_apprentissage <- create_scenario(
  system.file("input_1culture_2pop.xlsx", package = "ambre")
)
  result <- run_economic_analysis(scenario = scenario_apprentissage,
                      price_per_m3 = 0.1, 
                      membership_fee = 200, 
                      grant = 0.5,
                      initialSituation = TRUE)
  expect_equal(object = (names(result)),
               expected = c("annual", "allocation_key"))
  expect_false("total_investement" %in% names(result))
  
  result <- run_economic_analysis(scenario = scenario_apprentissage,
                      price_per_m3 = 0.1, 
                      membership_fee = 200, 
                      grant = 0.5,
                      initialSituation = FALSE)
  expect_equal(object = (names(result)),
               expected = c("annual", "total_investement", "allocation_key"))
})
