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

Method testParseKickOff

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

Source from the content-addressed store, hash-verified

33 }
34
35 @Test
36 public void testParseKickOff() throws ScannerException, ParserException {
37 List<String> tokens = getTokens("00:00 KO => D C @ DM");
38 Statement statement = (Statement) new Parser().parseTokenList(tokens);
39
40 assertEquals(TacticalPosition.X.D, statement.getActionOutcome().getTacticalPosition().getX());
41 assertEquals(TacticalPosition.Y.C, statement.getActionOutcome().getTacticalPosition().getY());
42 assertEquals(PitchPosition.DM, statement.getActionOutcome().getPitchPosition());
43 }
44
45 @Test(expected=ParserException.class)
46 public void testInvalidStatementEnd() throws ScannerException, ParserException {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected