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

Method testGetLayer

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

Test of getLayer method, of class World.

()

Source from the content-addressed store, hash-verified

241 * Test of getLayer method, of class World.
242 */
243 @Test
244 public void testGetLayer() {
245 System.out.println("getLayer");
246
247 World instance = new World();
248
249 Layer result = instance.getLayer(3);
250 assertNull(result);
251
252 Layer l1 = new Layer(instance);
253 Layer l2 = new Layer(instance);
254
255 instance.addLayer(l1);
256 instance.addLayer(l2);
257
258 result = instance.getLayer(l1.getId());
259 assertEquals(l1, result);
260 result = instance.getLayer(l2.getId());
261 assertEquals(l2, result);
262 }
263
264 /**
265 * Test of addLayer method, of class World.

Callers

nothing calls this directly

Calls 3

getLayerMethod · 0.95
addLayerMethod · 0.95
getIdMethod · 0.95

Tested by

no test coverage detected