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

Method testLoad

src/test/java/org/fgn/SchemaTest.java:15–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 private static final String FGN_ROOT = "src/test/resources/data/fgn";
14
15 @Test
16 public void testLoad() throws IOException {
17
18 Schema schema = Schema.create(FGN_ROOT + "/schema/classic.json");
19
20 assertEquals(12, schema.getContext().size());
21 assertEquals(2, schema.getOutcome().size());
22 assertEquals(18, schema.getCoordinates().size());
23 assertEquals(16, schema.getActions().size());
24
25 assertEquals("FREE", schema.getContext().get(0).getId());
26 assertEquals("Free play", schema.getContext().get(0).getName());
27 assertNull(schema.getContext().get(0).getDescription());
28
29 assertEquals("PST", schema.getOutcome().get(0).getId());
30 assertEquals("Ball hitting the post", schema.getOutcome().get(0).getDescription());
31
32 assertEquals("Awp", schema.getCoordinates().get(14).getId());
33 assertEquals("0.9", schema.getCoordinates().get(14).getX());
34 assertEquals("Apw", schema.getCoordinates().get(14).getLateral());
35
36 assertEquals("SwapWing", schema.getActions().get(15).getId());
37 }
38}

Callers

nothing calls this directly

Calls 10

createMethod · 0.95
getContextMethod · 0.95
getOutcomeMethod · 0.95
getCoordinatesMethod · 0.95
getActionsMethod · 0.95
getIdMethod · 0.80
getDescriptionMethod · 0.80
getLateralMethod · 0.80
getNameMethod · 0.65
getXMethod · 0.65

Tested by

no test coverage detected