Skip to content

Commit

Permalink
feat: controller gametest
Browse files Browse the repository at this point in the history
  • Loading branch information
starforcraft committed Dec 13, 2024
1 parent ef25098 commit 9260480
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
});
}
Expand Down

0 comments on commit 9260480

Please sign in to comment.