Skip to content

Commit 81637b9

Browse files
committed
add test
1 parent bfe60f0 commit 81637b9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_services.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,18 @@ end
380380
end
381381
end
382382

383+
@testset "Test Service Removal" begin
384+
sys = PSB.build_system(PSITestSystems, "test_RTS_GMLC_sys")
385+
res_up = PSY.get_component(PSY.VariableReserve{PSY.ReserveUp}, sys, "Flex_Up")
386+
res_dn = PSY.get_component(PSY.VariableReserve{PSY.ReserveDown}, sys, "Flex_Down")
387+
PSY.remove_component!(sys, res_dn)
388+
PSY.remove_component!(sys, res_up)
389+
@test isnothing(PSY.get_component(PSY.VariableReserve{PSY.ReserveUp}, sys, "Flex_Up"))
390+
@test isnothing(
391+
PSY.get_component(PSY.VariableReserve{PSY.ReserveDown}, sys, "Flex_Down"),
392+
)
393+
end
394+
383395
@testset "Test TransmissionInterface" begin
384396
sys = PSB.build_system(PSITestSystems, "test_RTS_GMLC_sys")
385397
lines = get_components(Line, sys)

0 commit comments

Comments
 (0)