|
| 1 | +package io.openems.edge.ess.fenecon.commercial40.charger; |
| 2 | + |
| 3 | +import org.junit.Test; |
| 4 | + |
| 5 | +import io.openems.edge.bridge.modbus.test.DummyModbusBridge; |
| 6 | +import io.openems.edge.common.test.ComponentTest; |
| 7 | +import io.openems.edge.common.test.DummyConfigurationAdmin; |
| 8 | +import io.openems.edge.ess.fenecon.commercial40.EssFeneconCommercial40Impl; |
| 9 | +import io.openems.edge.ess.test.ManagedSymmetricEssTest; |
| 10 | + |
| 11 | +public class EssFeneconCommercial40Pv2ImplTest { |
| 12 | + |
| 13 | + private static final String CHARGER_ID = "charger1"; |
| 14 | + private static final String ESS_ID = "ess0"; |
| 15 | + private static final String MODBUS_ID = "modbus0"; |
| 16 | + |
| 17 | + @Test |
| 18 | + public void test() throws Exception { |
| 19 | + var ess = new EssFeneconCommercial40Impl(); |
| 20 | + new ManagedSymmetricEssTest(ess) // |
| 21 | + .addReference("cm", new DummyConfigurationAdmin()) // |
| 22 | + .addReference("setModbus", new DummyModbusBridge(MODBUS_ID)) // |
| 23 | + .activate(io.openems.edge.ess.fenecon.commercial40.MyConfig.create() // |
| 24 | + .setId(ESS_ID) // |
| 25 | + .setModbusId(MODBUS_ID) // |
| 26 | + .setSurplusFeedInSocLimit(90) // |
| 27 | + .setSurplusFeedInAllowedChargePowerLimit(-8000) // |
| 28 | + .setSurplusFeedInIncreasePowerFactor(1.1) // |
| 29 | + .setSurplusFeedInMaxIncreasePowerFactor(2000) // |
| 30 | + .setSurplusFeedInPvLimitOnPowerDecreaseCausedByOvertemperature(5000) // |
| 31 | + .setSurplusFeedInOffTime("17:00:00") // |
| 32 | + .build()); |
| 33 | + |
| 34 | + new ComponentTest(new EssFeneconCommercial40Pv2Impl()) // |
| 35 | + .addReference("cm", new DummyConfigurationAdmin()) // |
| 36 | + .addReference("ess", ess) // |
| 37 | + .addReference("setModbus", new DummyModbusBridge(MODBUS_ID)) // |
| 38 | + .activate(MyConfigPv2.create() // |
| 39 | + .setId(CHARGER_ID) // |
| 40 | + .setModbusId(MODBUS_ID) // |
| 41 | + .setEssId(ESS_ID) // |
| 42 | + .setMaxActualPower(0) // |
| 43 | + .build()) // |
| 44 | + ; |
| 45 | + } |
| 46 | +} |
0 commit comments