Test of getCenterX method, of class Layer.
()
| 189 | * Test of getCenterX method, of class Layer. |
| 190 | */ |
| 191 | @Test |
| 192 | public void testGetCenterX() { |
| 193 | System.out.println("getCenterX"); |
| 194 | |
| 195 | Layer instance = new Layer(world); |
| 196 | |
| 197 | try { |
| 198 | instance.put(new Place("MyPlace", 3, 5, instance)); |
| 199 | instance.put(new Place("MyPlace", -6, -8, instance)); |
| 200 | |
| 201 | int expResult = (3-6)/2; |
| 202 | int result = instance.getCenterX(); |
| 203 | assertEquals(expResult, result); |
| 204 | } catch (Layer.PlaceNotInsertedException ex) { |
| 205 | Logger.getLogger(LayerTest.class.getName()).log(Level.SEVERE, null, ex); |
| 206 | fail(ex.getMessage()); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * Test of getCenterY method, of class Layer. |
nothing calls this directly
no test coverage detected