@Test public void testAddZone() { System.out.println("Testing addZone() method..."); System.out.print("\taddZone(null) must return false ..."); assertFalse(empty_bp.addZone(null)); System.out.println("OK"); System.out.print("\taddZone(zone) must return true..."); assertTrue(empty_bp.addZone(z1)); System.out.println("OK"); System.out.print("\taddZone(zone) must return true (multiple additions)..."); assertTrue(empty_bp.addZone(z2)); assertTrue(empty_bp.addZone(z3)); System.out.println("OK"); System.out.print("\tThe number of added zones are correct..."); assertEquals("Different elements", empty_bp.getZones().size(), 3); System.out.println("OK"); System.out.print("\tThe zones in the BorderPoint are the added ones..."); assertEquals("Different elements", empty_bp.getZones().get(0), z1); assertEquals("Different elements", empty_bp.getZones().get(1), z2); assertEquals("Different elements", empty_bp.getZones().get(2), z3); System.out.println("OK"); }
@Test public void testGetZones() { System.out.println("Testing getZones() method..."); System.out.print("\tgetZones() must return a list with the inserted zones..."); assertEquals("Different elements", bp.getZones().size(), 3); assertEquals("Different elements", bp.getZones().get(0), z1); assertEquals("Different elements", bp.getZones().get(1), z2); assertEquals("Different elements", bp.getZones().get(2), z3); System.out.println("OK"); }