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

Method testGetXMin

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

Test of getXMin method, of class Layer.

()

Source from the content-addressed store, hash-verified

271 * Test of getXMin method, of class Layer.
272 */
273 @Test
274 public void testGetXMin() {
275 System.out.println("getXMin");
276
277 Layer instance = new Layer(world);
278
279 // no place in layer
280 assertEquals(0, instance.getXMin());
281
282 // two places in layer
283 try {
284 instance.put(new Place("MyPlace", 3, 5, instance));
285 instance.put(new Place("MyPlace", -6, -8, instance));
286
287 int expResult = -6;
288 int result = instance.getXMin();
289 assertEquals(expResult, result);
290 } catch (Layer.PlaceNotInsertedException ex) {
291 Logger.getLogger(LayerTest.class.getName()).log(Level.SEVERE, null, ex);
292 fail(ex.getMessage());
293 }
294 }
295
296 /**
297 * Test of getXMax method, of class Layer.

Callers

nothing calls this directly

Calls 3

getXMinMethod · 0.95
putMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected