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

Method testActionParameter

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

Source from the content-addressed store, hash-verified

268 }
269
270 @Test
271 public void testActionParameter() throws ScannerException, ParserException {
272 List<String> tokens = getTokens("00:15 Md->Long:FT => F LC @ Apd");
273 Statement statement = (Statement) new Parser().parseTokenList(tokens);
274
275 assertEquals(15, statement.getTime());
276 assertEquals(PitchPosition.Md, statement.getPitchPosition());
277 assertEquals(ActionType.Long, statement.getAction().getType());
278 assertTrue(statement.getAction().isFirstTouch());
279 assertFalse(statement.getAction().isOpenPass());
280 assertEquals(TacticalPosition.X.F, statement.getActionOutcome().getTacticalPosition().getX());
281 assertEquals(TacticalPosition.Y.LC, statement.getActionOutcome().getTacticalPosition().getY());
282 assertEquals(PitchPosition.Apd, statement.getActionOutcome().getPitchPosition());
283 assertEquals(STANDARD, statement.getType());
284 }
285
286 @Test
287 public void testActionParameters() 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