public void GetTimesForUser_Success()
        {
            // Setup
            TimesheetContext db   = new TimesheetContext();
            User             user = db.Times.First().User;

            // Test action
            TimesheetRepository repository = new TimesheetRepository();
            var times = repository.GetTimesForUser(user.Id);

            // Assertions
            Assert.IsNotNull(times);
            Assert.IsTrue(times.Any());
        }
        /// <summary>
        /// Recursive function to get timesheet for self and all subordinates
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        private List <Time> GetTimes(int userId)
        {
            List <Time> times = new List <Time>();

            // Get the current users timesheet
            times.AddRange(repository.GetTimesForUser(userId));

            // Get all subordinates timesheets
            repository.GetSubordinatesForUser(userId)
            .ToList()
            .ForEach(u => times.AddRange(GetTimes(u.Id)));

            return(times);
        }