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

Method testStandardStatement

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

Source from the content-addressed store, hash-verified

161 }
162
163 @Test
164 public void testStandardStatement() throws ScannerException, ParserException {
165 List<String> tokens = getTokens("00:15 Md->Long => F LC @ Apd");
166 Statement statement = (Statement) new Parser().parseTokenList(tokens);
167
168 assertEquals(15, statement.getTime());
169 assertEquals(PitchPosition.Md, statement.getPitchPosition());
170 assertEquals(ActionType.Long, statement.getAction().getType());
171 assertEquals(TacticalPosition.X.F, statement.getActionOutcome().getTacticalPosition().getX());
172 assertEquals(TacticalPosition.Y.LC, statement.getActionOutcome().getTacticalPosition().getY());
173 assertEquals(PitchPosition.Apd, statement.getActionOutcome().getPitchPosition());
174 assertEquals(STANDARD, statement.getType());
175 }
176
177 @Test
178 public void testPassAction() 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