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

Method testParsedStatement

src/test/java/org/fgn/ParserTest.java:110–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108 }
109
110 @Test
111 public void testParsedStatement() throws ScannerException, ParserException {
112
113 Statement parsedStatement = parseStatement("03:20 L: Mw->LongPass => !Dg");
114
115 assertEquals(new MatchTime(3, 20), parsedStatement.getTime());
116 assertEquals("L", parsedStatement.getTeam());
117 assertEquals(Coordinates.getEntity("Mw"), parsedStatement.getStateIn().getSpace());
118 assertEquals("LongPass", parsedStatement.getAction().toString());
119 assertEquals(Coordinates.getEntity(("Dg")), parsedStatement.getStateOut().getSpace());
120 assertFalse(parsedStatement.getStateOut().isSamePossesion());
121 }
122
123 @Test
124 public void testCommentedStatement() throws ScannerException, ParserException {

Callers

nothing calls this directly

Calls 10

parseStatementMethod · 0.95
getTimeMethod · 0.95
getTeamMethod · 0.95
getEntityMethod · 0.95
getStateInMethod · 0.95
getActionMethod · 0.95
getStateOutMethod · 0.95
getSpaceMethod · 0.80
isSamePossesionMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected