Skip to content

Commit

Permalink
made an draft test case, which is unfinished
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingru923 committed Jan 24, 2024
1 parent 7667f19 commit 4bde4bc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions core/test/validation_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,24 @@ end
@test logger.logs[2].message ==
"Basin / subgrid_level subgrid_id 1 has repeated element levels, this cannot be interpolated."
end

"""@testitem "negative demand"
using Ribasim
using Logging
toml_path = normpath(
@__DIR__,
"../../generated_testmodels/invalid_discrete_control/ribasim.toml"
)
@test ispath(toml_path)
logger = TestLogger()
with_logger(logger) do
@test_throws "Demand of user node $id with priority #$p_itp should be non-negative" Ribasim.User(
[Ribasim.NodeID(1)],
[]
)
end
end"""

0 comments on commit 4bde4bc

Please sign in to comment.