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

Method testUnknownStates

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

Source from the content-addressed store, hash-verified

180 }
181
182 @Test
183 public void testUnknownStates() throws ScannerException, ParserException {
184
185 // This is meant to be a dynamic String placeholder, to test patching while ontology is pending
186 final String UNKNOWN_STATES_STATEMENT = "00:20 L: Apc->BounceOff => H(Apc)";
187 // final String UNKNOWN_STATES_STATEMENT = "13:30 T: Aw->Long => A(T) \t#!Ap(HD)";
188
189 Statement parsedStatement = parseStatement(UNKNOWN_STATES_STATEMENT);
190
191 assertEquals(new MatchTime(0, 20), parsedStatement.getTime());
192 assertEquals("L", parsedStatement.getTeam());
193 assertEquals(Coordinates.getEntity("Apc"), parsedStatement.getStateIn().getSpace());
194 assertEquals("BounceOff", parsedStatement.getAction().toString());
195 assertEquals(StateContext.getEntity("H"), parsedStatement.getStateOut().getContext());
196 assertEquals(Coordinates.getEntity("Apc"), parsedStatement.getStateOut().getSpace());
197 }
198
199 @Test
200 public void testRandomActionParsing() throws ScannerException, ParserException {

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected