MCPcopy Create free account
hub / github.com/atas76/openengine / testBallControl

Method testBallControl

src/test/java/org/ttn/ParserTest.java:123–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 }
122
123 @Test
124 public void testBallControl() throws ScannerException, ParserException {
125 List<String> tokens = getTokens("05:15 CK->Cross => M C @ AMd:Cnt");
126 Statement statement = (Statement) new Parser().parseTokenList(tokens);
127
128 assertEquals(STANDARD, statement.getType()); // In the current processing layer it is treated as a standard action
129 assertEquals(PitchPosition.CK, statement.getPitchPosition()); // Virtual pitch position
130 assertEquals(TacticalPosition.X.M, statement.getActionOutcome().getTacticalPosition().getX());
131 assertEquals(TacticalPosition.Y.C, statement.getActionOutcome().getTacticalPosition().getY());
132 assertEquals(PitchPosition.AMd, statement.getActionOutcome().getPitchPosition());
133 assertTrue(statement.getActionOutcome().isOutcome(ActionContext.CONTROL));
134 }
135
136 @Test
137 public void testTransitionBlockDefinition() throws ScannerException, ParserException {

Callers

nothing calls this directly

Calls 10

getTokensMethod · 0.95
getTypeMethod · 0.95
getPitchPositionMethod · 0.95
getActionOutcomeMethod · 0.95
parseTokenListMethod · 0.80
isOutcomeMethod · 0.80
getXMethod · 0.65
getYMethod · 0.65
getTacticalPositionMethod · 0.45
getPitchPositionMethod · 0.45

Tested by

no test coverage detected