Test of removePlace method, of class Layer.
()
| 673 | * Test of removePlace method, of class Layer. |
| 674 | */ |
| 675 | @Test |
| 676 | public void testRemove() { |
| 677 | System.out.println("remove"); |
| 678 | |
| 679 | Layer instance = new Layer(world); |
| 680 | |
| 681 | try { |
| 682 | Place element = new Place("MyPlace", 0, 0, instance); |
| 683 | instance.put(element); |
| 684 | assertEquals(element, instance.get(0, 0)); |
| 685 | assertTrue(instance.exist(0, 0)); |
| 686 | |
| 687 | instance.remove(element); |
| 688 | assertFalse(instance.exist(0, 0)); |
| 689 | } catch (RuntimeException | Layer.PlaceNotInsertedException ex) { |
| 690 | fail(ex.getMessage()); |
| 691 | } |
| 692 | } |
| 693 | |
| 694 | /** |
| 695 | * Test of exist method, of class Layer. |