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

Method testPassAction

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

Source from the content-addressed store, hash-verified

175 }
176
177 @Test
178 public void testPassAction() throws ScannerException, ParserException {
179 List<String> tokens = getTokens("04:17 MDw->Pass => AM L @ Mw");
180 Statement statement = (Statement) new Parser().parseTokenList(tokens);
181
182 assertEquals(257, statement.getTime());
183 assertEquals(PitchPosition.MDw, statement.getPitchPosition());
184 assertEquals(ActionType.Pass, statement.getAction().getType());
185 assertEquals(TacticalPosition.X.AM, statement.getActionOutcome().getTacticalPosition().getX());
186 assertEquals(TacticalPosition.Y.L, statement.getActionOutcome().getTacticalPosition().getY());
187 assertEquals(PitchPosition.Mw, statement.getActionOutcome().getPitchPosition());
188 assertEquals(STANDARD, statement.getType());
189 }
190
191 @Test
192 public void testBackPassAction() throws ScannerException, ParserException {

Callers

nothing calls this directly

Calls 12

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

Tested by

no test coverage detected