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

Method testGetCenterY

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

Test of getCenterY method, of class Layer.

()

Source from the content-addressed store, hash-verified

211 * Test of getCenterY method, of class Layer.
212 */
213 @Test
214 public void testGetCenterY() {
215 System.out.println("getCenterY");
216
217 Layer instance = new Layer(world);
218
219 try {
220 instance.put(new Place("MyPlace", 3, 5, instance));
221 instance.put(new Place("MyPlace", -6, -8, instance));
222
223 int expResult = (5-8)/2;
224 int result = instance.getCenterY();
225 assertEquals(expResult, result);
226 } catch (Layer.PlaceNotInsertedException ex) {
227 Logger.getLogger(LayerTest.class.getName()).log(Level.SEVERE, null, ex);
228 fail(ex.getMessage());
229 }
230 }
231
232 /**
233 * Test getExactCenter

Callers

nothing calls this directly

Calls 3

putMethod · 0.95
getCenterYMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected