MCPcopy Create free account
hub / github.com/Neop/mudmap2 / testSave

Method testSave

src/test/java/mudmap2/frontend/WorldTabTest.java:93–114  ·  view source on GitHub ↗

Test of save method, of class WorldTab.

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

setWorldFileMethod · 0.95
saveMethod · 0.95

Tested by

no test coverage detected