Skip to content

Commit

Permalink
Fix GoodWe JUnit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Feb 2, 2021
1 parent cfc9153 commit 2f97c1f
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,22 @@ public void testEt() throws Exception {
.setMaxBatteryPower(5_200) //
.setReadOnlyMode(false) //
.build()) //
.next(new TestCase() //
.input(ESS_SOC, 50) //
.input(ESS_GOODWE_TYPE, GoodweType.GOODWE_10K_ET)) //
.next(new TestCase("Scenario 1: (set-point is positive && set-point is lower than pv production)") //
.input(ESS_GOODWE_TYPE, GoodweType.GOODWE_10K_ET) //
.input(CHARGER_ACTUAL_POWER, 5_000) //
.input(ESS_SOC, 50) //
.input(ESS_SET_ACTIVE_POWER_EQUALS, 3_000) //
.output(ESS_EMS_POWER_MODE, PowerModeEms.CHARGE_BAT) //
.output(ESS_EMS_POWER_SET, 2000)) //
.next(new TestCase("Scenario 2: (set-point is positive && set-Point is bigger than pv production)") //
.input(CHARGER_ACTUAL_POWER, 5_000) //
.input(ESS_SOC, 50) //
.input(ESS_SET_ACTIVE_POWER_EQUALS, 8_000) //
.output(ESS_EMS_POWER_MODE, PowerModeEms.DISCHARGE_PV) //
.output(ESS_EMS_POWER_SET, 3000)) //
.next(new TestCase(
"Scenario 3: (set-point is negative && PV-Power is smaller than max charge power of the battery)") //
.input(CHARGER_ACTUAL_POWER, 3_000) //
.input(ESS_SOC, 50) //
.input(ESS_SET_ACTIVE_POWER_EQUALS, -2_000) //
.output(ESS_EMS_POWER_MODE, PowerModeEms.CHARGE_BAT) //
.output(ESS_EMS_POWER_SET, 5_000)) //
Expand All @@ -85,7 +84,6 @@ public void testEt() throws Exception {
.output(ESS_EMS_POWER_SET, 5_000)) //
.next(new TestCase("Scenario 6: (set-point is positive && set-point is lower than pv production)") //
.input(CHARGER_ACTUAL_POWER, 5_000) //
.input(ESS_SOC, 100) //
.input(ESS_SET_ACTIVE_POWER_EQUALS, 3_000) //
.output(ESS_EMS_POWER_MODE, PowerModeEms.EXPORT_AC) //
.output(ESS_EMS_POWER_SET, 3_000)) //
Expand All @@ -107,14 +105,14 @@ public void testBt() throws Exception {
.setMaxBatteryPower(5_200) //
.setReadOnlyMode(false) //
.build()) //
.next(new TestCase("Scenario 1: (set-point is positive)") //
.input(ESS_GOODWE_TYPE, GoodweType.GOODWE_10K_BT) //
.next(new TestCase() //
.input(ESS_SOC, 50) //
.input(ESS_GOODWE_TYPE, GoodweType.GOODWE_10K_BT)) //
.next(new TestCase("Scenario 1: (set-point is positive)") //
.input(ESS_SET_ACTIVE_POWER_EQUALS, 3_000) //
.output(ESS_EMS_POWER_MODE, PowerModeEms.DISCHARGE_BAT) //
.output(ESS_EMS_POWER_SET, 3000)) //
.next(new TestCase("Scenario 2: (set-point is negative)") //
.input(ESS_SOC, 50) //
.input(ESS_SET_ACTIVE_POWER_EQUALS, -4000) //
.output(ESS_EMS_POWER_MODE, PowerModeEms.CHARGE_BAT) //
.output(ESS_EMS_POWER_SET, 4000)) //
Expand Down

0 comments on commit 2f97c1f

Please sign in to comment.