MCPcopy Create free account
hub / github.com/akeranen/the-one / testMovement

Method testMovement

test/ExternalMovementTest.java:81–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 }
80
81 public void testMovement() throws Exception {
82 setUpUsing(INPUT);
83
84 // h3 should not get any fancy coordinates
85 assertEquals(c0, h3.getLocation());
86 assertFalse(h3.isMovementActive());
87
88 // test that h1 and h2 move according to input data
89 for (int i=0; i<INPUT_COORDS.length; i++) {
90 assertEquals((i+1) + ". coord of h1",
91 INPUT_COORDS[0][i], h1.getLocation());
92 assertEquals((i+1) + ". coord of h2",
93 INPUT_COORDS[1][i], h2.getLocation());
94
95 clock.advance(CLOCK_STEP);
96 moveAllHosts(CLOCK_STEP);
97 }
98 }
99
100 public void testStationary() throws Exception {
101 setUpUsing(STATIONARY_INPUT);

Callers

nothing calls this directly

Calls 5

setUpUsingMethod · 0.95
moveAllHostsMethod · 0.95
isMovementActiveMethod · 0.80
advanceMethod · 0.80
getLocationMethod · 0.45

Tested by

no test coverage detected