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

Method testGetHome

src/test/java/mudmap2/backend/WorldTest.java:188–205  ·  view source on GitHub ↗

Test of getHome method, of class World.

()

Source from the content-addressed store, hash-verified

186 * Test of getHome method, of class World.
187 */
188 @Test
189 public void testGetHome() {
190 System.out.println("getHome");
191
192 World instance = new World();
193
194 WorldCoordinate expResult = new WorldCoordinate(0, 0, 0);
195 WorldCoordinate result = instance.getHome();
196 assertTrue(expResult.compareTo(result) == 0);
197
198 int x = 5, y = 12;
199 Layer l = instance.getNewLayer();
200 instance.setHome(new WorldCoordinate(l.getId(), x, y));
201
202 expResult = new WorldCoordinate(l.getId(), x, y);
203 result = instance.getHome();
204 assertTrue(expResult.compareTo(result) == 0);
205 }
206
207 /**
208 * Test of setHome method, of class World.

Callers

nothing calls this directly

Calls 5

getHomeMethod · 0.95
compareToMethod · 0.95
getNewLayerMethod · 0.95
setHomeMethod · 0.95
getIdMethod · 0.95

Tested by

no test coverage detected