From 926048041348402a840400e3ec3c433b0998ee3c Mon Sep 17 00:00:00 2001 From: Starforcraft Date: Tue, 10 Dec 2024 19:27:12 +0100 Subject: [PATCH] feat: controller gametest --- .../refinedstorage/common/GameTestUtil.java | 2 +- .../common/controller/ControllerTest.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java index 8b02bf950..2030d3a82 100644 --- a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java +++ b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage.api.core.Action; import com.refinedmods.refinedstorage.api.network.Network; -import com.refinedmods.refinedstorage.api.network.energy.EnergyNetworkComponent; +import com.refinedmods.refinedstorage.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage.api.network.node.NetworkNode; import com.refinedmods.refinedstorage.api.network.storage.StorageNetworkComponent; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; diff --git a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/controller/ControllerTest.java b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/controller/ControllerTest.java index af85e631d..2af8892d9 100644 --- a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/controller/ControllerTest.java +++ b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/controller/ControllerTest.java @@ -34,16 +34,16 @@ public static void shouldConsumeEnergy(final GameTestHelper helper) { // Assert sequence .thenIdle(20) - .thenExecute(() -> energyStoredExactly(energyStorage.getStored(), energyStorage.getCapacity())) + .thenExecute(energyStoredExactly(energyStorage, energyStorage.getCapacity())) .thenWaitUntil(() -> helper.setBlock(pos.above(), RSBLOCKS.getGrid().getDefault())) .thenIdle(1) - .thenExecute(() -> energyStoredExactly( - energyStorage.getStored(), + .thenExecute(energyStoredExactly( + energyStorage, energyStorage.getCapacity() - Platform.INSTANCE.getConfig().getGrid().getEnergyUsage() )) .thenIdle(9) - .thenExecute(() -> energyStoredExactly( - energyStorage.getStored(), + .thenExecute(energyStoredExactly( + energyStorage, energyStorage.getCapacity() - Platform.INSTANCE.getConfig().getGrid().getEnergyUsage() * 10 )) .thenSucceed(); @@ -62,10 +62,10 @@ public static void shouldNotConsumeEnergy(final GameTestHelper helper) { // Assert sequence .thenIdle(20) - .thenExecute(() -> energyStoredExactly(energyStorage.getStored(), energyStorage.getCapacity())) + .thenExecute(energyStoredExactly(energyStorage, energyStorage.getCapacity())) .thenWaitUntil(() -> helper.setBlock(pos.above(), RSBLOCKS.getGrid().getDefault())) .thenIdle(20) - .thenExecute(() -> energyStoredExactly(energyStorage.getStored(), energyStorage.getCapacity())) + .thenExecute(energyStoredExactly(energyStorage, energyStorage.getCapacity())) .thenSucceed(); }); }