Test of getYMin method, of class Layer.
()
| 323 | * Test of getYMin method, of class Layer. |
| 324 | */ |
| 325 | @Test |
| 326 | public void testGetYMin() { |
| 327 | System.out.println("getYMin"); |
| 328 | |
| 329 | Layer instance = new Layer(world); |
| 330 | |
| 331 | // no place in layer |
| 332 | assertEquals(0, instance.getYMin()); |
| 333 | |
| 334 | // two places in layer |
| 335 | try { |
| 336 | instance.put(new Place("MyPlace", 3, 5, instance)); |
| 337 | instance.put(new Place("MyPlace", -6, -8, instance)); |
| 338 | |
| 339 | int expResult = -8; |
| 340 | int result = instance.getYMin(); |
| 341 | assertEquals(expResult, result); |
| 342 | } catch (Layer.PlaceNotInsertedException ex) { |
| 343 | Logger.getLogger(LayerTest.class.getName()).log(Level.SEVERE, null, ex); |
| 344 | fail(ex.getMessage()); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Test of getYMax method, of class Layer. |