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

test_that("barrier_cost_calculation works", {
  scenario_apprentissage <- create_scenario(
    system.file("input_1culture_2pop.xlsx", package = "ambre")
  )
  irrigation_need <- irrigation_need_calculation(scenario_apprentissage)
  result <- process_cost_calculation(scenario = irrigation_need,
                                     membership_fee = 200,
                                    charge = 0.1,
                                    initialSituation = TRUE)
  expect_equal(object = names(result),
               expected = c("CropName", "Area", "PopulationName", "nb_population", "PathName", 
"STEPtreatmentName", "CollectiveTreatmentName", "InitialProcessName", 
"SupplementaryProcessName", "nb_day_decay", "config", "CropID", 
"CropHeight", "PopulationID", "PathID", "MatrixID", "STEPtreatmentID", 
"CollectiveTreatmentID", "InitialProcessID", "SupplementaryProcessID", 
"InitialTrainName", "InitialTrainID", "SupplementaryTrainName", 
"SupplementaryTrainID", "IrrigationNeed", "irrigation_need_m3an", 
"perimeter", "capex_supplementaryProcess", "capex_supplementaryProcess_20y", 
"opex_supplementaryProcess")) 
})
