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

test_that("update_treatment_scheme works", {
  scenario_test <- create_scenario(
    system.file("input_1culture_2pop.xlsx", package = "ambre")
  )
  result <- update_treatment_scheme(scenario_test, initial_situation = TRUE)
  
  expect_true("InitialTrainName" %in% colnames(scenario_test))
  
  expect_equal(object = colnames(result$config[[1]][["treatment"]][["schemes"]]),
               expected = c("TreatmentSchemeID", 
                            "TreatmentSchemeName", 
                            "TreatmentName",
                            "TreatmentID"))
  
  result <- update_treatment_scheme(scenario_test, initial_situation = FALSE)
  
  expect_true("SupplementaryTrainName" %in% colnames(scenario_test))
})
