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

Method testGetXMax

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

Test of getXMax method, of class Layer.

()

Source from the content-addressed store, hash-verified

297 * Test of getXMax method, of class Layer.
298 */
299 @Test
300 public void testGetXMax() {
301 System.out.println("getXMax");
302
303 Layer instance = new Layer(world);
304
305 // no place in layer
306 assertEquals(0, instance.getXMax());
307
308 // two places in layer
309 try {
310 instance.put(new Place("MyPlace", 3, 5, instance));
311 instance.put(new Place("MyPlace", -6, -8, instance));
312
313 int expResult = 3;
314 int result = instance.getXMax();
315 assertEquals(expResult, result);
316 } catch (Layer.PlaceNotInsertedException ex) {
317 Logger.getLogger(LayerTest.class.getName()).log(Level.SEVERE, null, ex);
318 fail(ex.getMessage());
319 }
320 }
321
322 /**
323 * Test of getYMin method, of class Layer.

Callers

nothing calls this directly

Calls 3

getXMaxMethod · 0.95
putMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected