public bool removeUnitByObjectInstance(UnitGroup unitGroup, Unit inputUnit, List<Unit> expectedOutputUnits)
 {
     unitGroup = new UnitGroup(expectedOutputUnits);
     unitGroup.removeUnit(inputUnit);
     List<Unit> units = unitGroup.getUnits();
     return !validateUnitInList(units, inputUnit.ID);
 }
        public bool removeUnitByNonExistingObjectInstance(UnitGroup unitGroup, Unit inputUnit, List<Unit> expectedOutputUnits)
        {
            unitGroup = new UnitGroup(expectedOutputUnits);
            unitGroup.removeUnit(inputUnit);

            List<Unit> units = unitGroup.getUnits();

            // Check that unit no longer exists
            if (validateUnitInList(units, inputUnit.ID)) { return false; }

            // Check that the list is unaltered
            if (!validateUnitsListUnaltered(units, expectedOutputUnits)) { return false; }

            return true;
        }
 public bool removeUnitByID(UnitGroup unitGroup, int inputID, List<Unit> expectedOutputUnits)
 {
     unitGroup = new UnitGroup(expectedOutputUnits);
     unitGroup.removeUnit(inputID);
     List<Unit> units = unitGroup.getUnits();
     return !validateUnitInList(units, inputID);
 }