@Test public void merge1() { UnitList list1 = new MyUnitList("m", "m", "s"); UnitList list2 = new MyUnitList("kg", "m", "s", "s"); UnitList expected = new MyUnitList("kg", "m", "m", "m", "s", "s", "s"); Assert.assertEquals(expected, list1.merge(list2)); }
@Test public void cancel5() { UnitList list1 = new MyUnitList("kg", "m", "m", "s"); UnitList list2 = new MyUnitList("kg", "kg", "m", "s"); UnitList result = new MyUnitList("m"); Assert.assertEquals(result, list1.cancel(list2)); }
@Test public void nMerge3() { UnitList list = new MyUnitList("kg", "m", "s"); UnitList expected = new MyUnitList("kg", "kg", "m", "m", "s", "s"); Assert.assertEquals(expected, list.nMerge(2)); }