public bool updateUnit(UnitGroup unitGroup, Unit inputUnit, Unit expectedOutputUnit)
 {
     unitGroup.addUnit(inputUnit);
     unitGroup.addUnit(expectedOutputUnit);
     Unit returnedUnit = unitGroup.getUnit(inputUnit.ID);
     return (expectedOutputUnit.ID == returnedUnit.ID &&
             expectedOutputUnit.Name == returnedUnit.Name);
 }
        public bool getUnitByID(UnitGroup unitGroup, int inputID, Unit expectedOutputUnit)
        {
            Unit startingUnit = new Unit(inputID);
            unitGroup = new UnitGroup(new List<Unit>() { startingUnit });

            Unit returnedUnit = unitGroup.getUnit(inputID);
            return (expectedOutputUnit.ID == returnedUnit.ID);
        }
        public bool getUnitByNonExistingID(UnitGroup unitGroup, int inputID)
        {
            Unit startingUnit = new Unit(inputID);
            unitGroup = new UnitGroup(new List<Unit>() { startingUnit });

            int nonExistingID = inputID + 1;

            try
            {
                Unit returnedUnit = unitGroup.getUnit(nonExistingID);
                return false;
            }
            catch (KeyNotFoundException ex)
            {
                Console.WriteLine(ex.Message);
                return true;
            }
        }
 public bool addUnit(UnitGroup unitGroup, Unit inputUnit, Unit expectedOutputUnit)
 {
     unitGroup.addUnit(inputUnit);
     Unit returnedUnit = unitGroup.getUnit(inputUnit.ID);
     return (expectedOutputUnit.ID == returnedUnit.ID);
 }