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

Method testGetYMax

src/test/java/mudmap2/backend/LayerTest.java:351–372  ·  view source on GitHub ↗

Test of getYMax method, of class Layer.

()

Source from the content-addressed store, hash-verified

349 * Test of getYMax method, of class Layer.
350 */
351 @Test
352 public void testGetYMax() {
353 System.out.println("getYMax");
354
355 Layer instance = new Layer(world);
356
357 // no place in layer
358 assertEquals(0, instance.getYMax());
359
360 // two places in layer
361 try {
362 instance.put(new Place("MyPlace", 3, 5, instance));
363 instance.put(new Place("MyPlace", -6, -8, instance));
364
365 int expResult = 5;
366 int result = instance.getYMax();
367 assertEquals(expResult, result);
368 } catch (Layer.PlaceNotInsertedException ex) {
369 Logger.getLogger(LayerTest.class.getName()).log(Level.SEVERE, null, ex);
370 fail(ex.getMessage());
371 }
372 }
373
374 /**
375 * Test of putPlace method, of class Layer.

Callers

nothing calls this directly

Calls 3

getYMaxMethod · 0.95
putMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected