diff --git a/src/test/java/org/openengine/vanilla/TacticalBehaviour433GlobalPassingTest.java b/src/test/java/org/openengine/vanilla/TacticalBehaviour433GlobalPassingTest.java index e763dd0a..953cb773 100644 --- a/src/test/java/org/openengine/vanilla/TacticalBehaviour433GlobalPassingTest.java +++ b/src/test/java/org/openengine/vanilla/TacticalBehaviour433GlobalPassingTest.java @@ -5,8 +5,7 @@ import org.openengine.vanilla.util.Flags; import static org.junit.Assert.assertEquals; -import static org.openengine.vanilla.State.HORIZONTAL_DISTANCE_UNIT_FACTOR; -import static org.openengine.vanilla.State.VERTICAL_DISTANCE_UNIT_FACTOR; +import static org.openengine.vanilla.State.*; public class TacticalBehaviour433GlobalPassingTest { @@ -28,7 +27,7 @@ public void testGoalkeeperActionsProbabilisticAssertions() { assertEquals(0.1 * xP * 2.0, testOutput.getPossessionOutcomeByPosition(Position.D_L), DELTA); assertEquals(0.1 * xP, testOutput.getPossessionOutcomeByPosition(Position.D_CR), DELTA); assertEquals(0.1 * xP, testOutput.getPossessionOutcomeByPosition(Position.D_CL), DELTA); - assertEquals(0.1 * xP / VERTICAL_DISTANCE_UNIT_FACTOR, + assertEquals(0.1 * xP / getUnitFactor(VERTICAL_DISTANCE_WEIGHT * 0.5), testOutput.getPossessionOutcomeByPosition(Position.M_RC), DELTA); assertEquals(0.1 * xP / VERTICAL_DISTANCE_UNIT_FACTOR, testOutput.getPossessionOutcomeByPosition(Position.M_C), DELTA); @@ -36,9 +35,9 @@ public void testGoalkeeperActionsProbabilisticAssertions() { testOutput.getPossessionOutcomeByPosition(Position.M_LC), DELTA); assertEquals(0.1 * xP / (2 * VERTICAL_DISTANCE_UNIT_FACTOR), testOutput.getPossessionOutcomeByPosition(Position.F_RC), DELTA); - assertEquals(0.1 * xP / (2 * VERTICAL_DISTANCE_UNIT_FACTOR), + assertEquals(0.1 * xP / (2 * getUnitFactor(VERTICAL_DISTANCE_WEIGHT * 0.5)), testOutput.getPossessionOutcomeByPosition(Position.F_C), DELTA); - assertEquals(0.1 * xP / (2 * VERTICAL_DISTANCE_UNIT_FACTOR), + assertEquals(0.1 * xP / (2 * getUnitFactor(VERTICAL_DISTANCE_WEIGHT * 0.5)), testOutput.getPossessionOutcomeByPosition(Position.F_LC), DELTA); }