Test of getCenterY method, of class Layer.
()
| 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 |
nothing calls this directly
no test coverage detected