### Persephone - a socio-economic-ecological model of European agricultural landscapes.
###
### This is the top-level file of the Persephone test suite. Execute this to run all tests.
###

using Pkg
Pkg.activate("..")

using Agents
using Dates
using Logging
using Persephone
using Random
using StableRNGs
using Test

const Ps = Persephone

const TESTPARAMETERS = "test_parameters.toml"
const TESTSETTINGS = Ps.getsettings(TESTPARAMETERS)

@testset "Persephone Tests" begin
    @testset "Core model" begin
        include("io_tests.jl")
        include("landscape_tests.jl")
        include("simulation_tests.jl")
    end
    @testset "Nature model" begin
        include("nature_tests.jl")
    end
    @testset "Crop growth model" begin
        include("crop_tests.jl")
    end
    @testset "Farm model" begin
        include("farm_tests.jl")
    end
    rm(TESTSETTINGS["core"]["outdir"], force=true, recursive=true)
end