Test fixes

This commit is contained in:
Anuken 2020-12-07 12:12:08 -05:00
parent 25125f5a9b
commit b4e7928622

View File

@ -55,7 +55,7 @@ public class PowerTests extends PowerTestFixture{
void simulateDirectConsumption(float producedPower, float requiredPower, float expectedSatisfaction, String parameterDescription){
Tile producerTile = createFakeTile(0, 0, createFakeProducerBlock(producedPower));
producerTile.<GeneratorBuild>bc().productionEfficiency = 1f;
((GeneratorBuild)producerTile.build).productionEfficiency = 1f;
Tile directConsumerTile = createFakeTile(0, 1, createFakeDirectConsumer(requiredPower));
PowerGraph powerGraph = new PowerGraph();
@ -95,7 +95,7 @@ public class PowerTests extends PowerTestFixture{
if(producedPower > 0.0f){
Tile producerTile = createFakeTile(0, 0, createFakeProducerBlock(producedPower));
producerTile.<GeneratorBuild>bc().productionEfficiency = 1f;
((GeneratorBuild)producerTile.build).productionEfficiency = 1f;
powerGraph.add(producerTile.build);
}
Tile directConsumerTile = null;
@ -120,7 +120,7 @@ public class PowerTests extends PowerTestFixture{
@Test
void directConsumptionStopsWithNoPower(){
Tile producerTile = createFakeTile(0, 0, createFakeProducerBlock(10.0f));
producerTile.<GeneratorBuild>bc().productionEfficiency = 1.0f;
((GeneratorBuild)producerTile.build).productionEfficiency = 1.0f;
Tile consumerTile = createFakeTile(0, 1, createFakeDirectConsumer(5.0f));
PowerGraph powerGraph = new PowerGraph();