Testing tests
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
}};
|
}};
|
||||||
|
|||||||
Reference in New Issue
Block a user