MCPcopy Create free account
hub / github.com/Neop/mudmap2 / testAddPlaceGroup

Method testAddPlaceGroup

src/test/java/mudmap2/backend/WorldTest.java:652–673  ·  view source on GitHub ↗

Test of addPlaceGroup method, of class World.

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

addPlaceGroupMethod · 0.95
getPlaceGroupsMethod · 0.95
containsMethod · 0.65

Tested by

no test coverage detected