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

Method testActionParameters

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

Source from the content-addressed store, hash-verified

284 }
285
286 @Test
287 public void testActionParameters() throws ScannerException, ParserException {
288 List<String> tokens = getTokens("00:15 Md->Long:FT:Open => F LC @ Apd");
289 Statement statement = (Statement) new Parser().parseTokenList(tokens);
290
291 assertEquals(15, statement.getTime());
292 assertEquals(PitchPosition.Md, statement.getPitchPosition());
293 assertEquals(ActionType.Long, statement.getAction().getType());
294 assertTrue(statement.getAction().isFirstTouch());
295 assertTrue(statement.getAction().isOpenPass());
296 assertEquals(TacticalPosition.X.F, statement.getActionOutcome().getTacticalPosition().getX());
297 assertEquals(TacticalPosition.Y.LC, statement.getActionOutcome().getTacticalPosition().getY());
298 assertEquals(PitchPosition.Apd, statement.getActionOutcome().getPitchPosition());
299 assertEquals(STANDARD, statement.getType());
300 }
301
302 @Test
303 public void testInterceptionAndRestingOutcome() throws ScannerException, ParserException {

Callers

nothing calls this directly

Calls 14

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

Tested by

no test coverage detected