Test of addPlaceGroup method, of class World.
()
| 650 | * Test of addPlaceGroup method, of class World. |
| 651 | */ |
| 652 | @Test |
| 653 | public void testAddPlaceGroup() { |
| 654 | System.out.println("addPlaceGroup"); |
| 655 | |
| 656 | World instance = new World("MyWorld"); |
| 657 | |
| 658 | PlaceGroup a1 = new PlaceGroup("myGroup", Color.yellow); |
| 659 | PlaceGroup a2 = new PlaceGroup("Second group", Color.yellow); |
| 660 | instance.addPlaceGroup(a1); |
| 661 | instance.addPlaceGroup(a2); |
| 662 | |
| 663 | assertTrue(instance.getPlaceGroups().contains(a1)); |
| 664 | assertTrue(instance.getPlaceGroups().contains(a2)); |
| 665 | |
| 666 | // test null |
| 667 | try { |
| 668 | instance.addPlaceGroup(null); |
| 669 | fail(); |
| 670 | } catch(Exception ex){ |
| 671 | // expected |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | /** |
| 676 | * Test of removePlaceGroup method, of class World. |
nothing calls this directly
no test coverage detected