Testing tests

This commit is contained in:
Anuken
2020-12-04 12:23:02 -05:00
parent 8b8d990852
commit 7b1c60c24f
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ public class ItemLiquidGeneratorTests extends PowerTestFixture{
public void createGenerator(InputType inputType){ public void createGenerator(InputType inputType){
Vars.state = new GameState(); Vars.state = new GameState();
Vars.state.rules = new Rules(); Vars.state.rules = new Rules();
generator = new ItemLiquidGenerator(inputType != InputType.liquids, inputType != InputType.items, "fakegen"){ generator = new ItemLiquidGenerator(inputType != InputType.liquids, inputType != InputType.items, "fakegen" + System.nanoTime()){
{ {
powerProduction = 0.1f; powerProduction = 0.1f;
itemDuration = fakeItemDuration; itemDuration = fakeItemDuration;

View File

@@ -50,21 +50,21 @@ public class PowerTestFixture{
} }
protected static PowerGenerator createFakeProducerBlock(float producedPower){ protected static PowerGenerator createFakeProducerBlock(float producedPower){
return new PowerGenerator("fakegen"){{ return new PowerGenerator("fakegen" + System.nanoTime()){{
buildType = () -> new GeneratorBuild(); buildType = () -> new GeneratorBuild();
powerProduction = producedPower; powerProduction = producedPower;
}}; }};
} }
protected static Battery createFakeBattery(float capacity){ protected static Battery createFakeBattery(float capacity){
return new Battery("fakebattery"){{ return new Battery("fakebattery" + System.nanoTime()){{
buildType = () -> new BatteryBuild(); buildType = () -> new BatteryBuild();
consumes.powerBuffered(capacity); consumes.powerBuffered(capacity);
}}; }};
} }
protected static Block createFakeDirectConsumer(float powerPerTick){ protected static Block createFakeDirectConsumer(float powerPerTick){
return new PowerBlock("fakedirectconsumer"){{ return new PowerBlock("fakedirectconsumer" + System.nanoTime()){{
buildType = Building::create; buildType = Building::create;
consumes.power(powerPerTick); consumes.power(powerPerTick);
}}; }};