Beispiel #1
0
        public async void CanGetAll()
        {
            var expected = new List <TimeEntryDto>
            {
                new TimeEntryDto {
                    TimeEntryId = "TimeEntryId"
                }
            };

            _repository.LoadTimeEntriesAsync(UserId).Returns(expected);

            var actual = await _controller.GetAllByUserId(UserId);

            actual.Should().BeEquivalentTo(expected);
        }
        public async Task <IEnumerable <TimeEntryDto> > GetAllByUserId(string userId)
        {
            var entries = await _timeEntryRepository.LoadTimeEntriesAsync(userId);

            return(entries.ToList());
        }