(String[] input)
| 49 | private SimClock clock; |
| 50 | |
| 51 | protected void setUpUsing(String[] input) throws Exception { |
| 52 | super.setUp(); |
| 53 | ExternalMovement.reset(); |
| 54 | TestSettings ts = new TestSettings(); |
| 55 | ts.putSetting(MovementModel.MOVEMENT_MODEL_NS + "." + |
| 56 | MovementModel.WORLD_SIZE, "1000,1000"); |
| 57 | File outFile = File.createTempFile("eMovementTest", ".tmp"); |
| 58 | outFile.deleteOnExit(); |
| 59 | PrintWriter pw = new PrintWriter(outFile); |
| 60 | |
| 61 | for (String s : input) { |
| 62 | pw.println(s); |
| 63 | } |
| 64 | |
| 65 | pw.close(); |
| 66 | |
| 67 | ts.putSetting(ExternalMovement.EXTERNAL_MOVEMENT_NS + "." + |
| 68 | ExternalMovement.MOVEMENT_FILE_S, outFile.getAbsolutePath()); |
| 69 | |
| 70 | MovementModel emProto = (MovementModel) |
| 71 | ts.createIntializedObject("movement.ExternalMovement"); |
| 72 | |
| 73 | TestUtils utils = new TestUtils(null, null, ts); |
| 74 | h1 = utils.createHost(emProto, "h1"); |
| 75 | h2 = utils.createHost(emProto, "h2"); |
| 76 | h3 = utils.createHost(emProto, "h3"); |
| 77 | clock = SimClock.getInstance(); |
| 78 | clock.setTime(0); |
| 79 | } |
| 80 | |
| 81 | public void testMovement() throws Exception { |
| 82 | setUpUsing(INPUT); |
no test coverage detected