Skip to content
Snippets Groups Projects
Commit 99174d27 authored by Marco Matthies's avatar Marco Matthies
Browse files

Fix FarmPlot constructor calls in crop model tests

parent e2307962
Branches
Tags
No related merge requests found
...@@ -21,7 +21,10 @@ end ...@@ -21,7 +21,10 @@ end
@testset "Submodule ALMaSS" begin @testset "Submodule ALMaSS" begin
ct = Ps.ALMaSS.CropType("olive tree", missing, missing, missing, missing, missing, ct = Ps.ALMaSS.CropType("olive tree", missing, missing, missing, missing, missing,
missing, missing) missing, missing)
fp = FarmPlot(0, [(0,0)], id = 0
pixels = [(0, 0)]
farmer = 0
fp = FarmPlot(id, pixels, farmer,
Ps.ALMaSS.CropState(ct, Ps.ALMaSS.janfirst, 0.0, 0.0m, 0.0, 0.0, Ps.Management[])) Ps.ALMaSS.CropState(ct, Ps.ALMaSS.janfirst, 0.0, 0.0m, 0.0, 0.0, Ps.Management[]))
@test fp isa FarmPlot @test fp isa FarmPlot
@test fp isa FarmPlot{Ps.ALMaSS.CropState} @test fp isa FarmPlot{Ps.ALMaSS.CropState}
...@@ -34,7 +37,10 @@ end ...@@ -34,7 +37,10 @@ end
@testset "Submodule SimpleCrop" begin @testset "Submodule SimpleCrop" begin
ct = Ps.SimpleCrop.CropType("olive tree") ct = Ps.SimpleCrop.CropType("olive tree")
fp = FarmPlot(0, [(0,0)], Ps.SimpleCrop.CropState(ct, 0.0cm)) id = 0
pixels = [(0, 0)]
farmer = 0
fp = FarmPlot(id, pixels, farmer, Ps.SimpleCrop.CropState(ct, 0.0cm))
@test fp isa FarmPlot @test fp isa FarmPlot
@test fp isa FarmPlot{Ps.SimpleCrop.CropState} @test fp isa FarmPlot{Ps.SimpleCrop.CropState}
@test croptype(fp) isa Ps.SimpleCrop.CropType @test croptype(fp) isa Ps.SimpleCrop.CropType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment