@Test public void testAddItemDuplicate() { Menu m = new Menu(name, description); assertTrue(m.addItem(i1)); assertFalse(m.addItem(i1)); assertTrue(m.addItem(i2)); }
@Test public void testSetSpecial() { Menu m = new Menu(name, description); assertTrue(m.addItem(i1)); assertTrue(m.setSpecial(i1)); assertTrue(m.getSpecial().equals(i1)); }
@Test public void testRemoveItem() { Menu m = new Menu(name, description); assertTrue(m.addItem(i1)); assertTrue(m.addItem(i2)); assertTrue(m.removeItem(i1)); assertTrue(m.removeItem(i2)); }
@Test public void testEquals() { Menu m1 = new Menu(name, description); assertTrue(m1.addItem(i1)); assertTrue(m1.addItem(i2)); Menu m2 = new Menu(name, description); assertTrue(m2.addItem(i1)); assertTrue(m2.addItem(i2)); assertTrue(m1.equals(m2)); }
@Test public void testSetSpecialNoItems() { Menu m = new Menu(name, description); assertFalse(m.setSpecial(i2)); }