Test of save method, of class WorldTab.
()
| 91 | * Test of save method, of class WorldTab. |
| 92 | */ |
| 93 | @Test |
| 94 | public void testSave() { |
| 95 | try { |
| 96 | System.out.println("save"); |
| 97 | |
| 98 | File file = File.createTempFile("mudmap2_junit_WorldTabTest_testSave", ""); |
| 99 | file.delete(); |
| 100 | assertFalse(file.exists()); |
| 101 | |
| 102 | World world = new World(); |
| 103 | world.setWorldFile(new WorldFileDefault(file.getAbsolutePath())); |
| 104 | |
| 105 | WorldTab instance = new WorldTab(null, world, false); |
| 106 | instance.save(); |
| 107 | |
| 108 | assertTrue(file.exists()); |
| 109 | file.delete(); |
| 110 | assertFalse(file.exists()); |
| 111 | } catch (IOException ex) { |
| 112 | fail(ex.getMessage()); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Test of layerSelected method, of class WorldTab. |
nothing calls this directly
no test coverage detected