()
| 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); |
nothing calls this directly
no test coverage detected