(String path)
| 246 | } |
| 247 | |
| 248 | private void writeToFile(String path) throws IOException { |
| 249 | File tempFile = new File(path); |
| 250 | PrintWriter out = new PrintWriter(tempFile); |
| 251 | out.println(WKT); |
| 252 | out.close(); |
| 253 | String ns = MapBasedMovement.MAP_BASE_MOVEMENT_NS + "."; |
| 254 | |
| 255 | // override sim map settings |
| 256 | File settingsFile = File.createTempFile("settingsFile", ".tmp"); |
| 257 | settingsFile.deleteOnExit(); |
| 258 | PrintWriter pw = new PrintWriter(settingsFile); |
| 259 | pw.println(ns + MapBasedMovement.NROF_FILES_S + " = 1"); |
| 260 | // need to change path separators for settings file |
| 261 | pw.println(ns + MapBasedMovement.FILE_S + "1 = " + |
| 262 | tempFile.getAbsolutePath().replace('\\', '/')); |
| 263 | pw.close(); |
| 264 | Settings.init(settingsFile.getAbsolutePath()); |
| 265 | |
| 266 | } |
| 267 | |
| 268 | } |
no test coverage detected