Exemple #1
0
        public async Task UpdateAsync_Exception_WhenInvalidEntry()
        {
            _validationService.ValidateUpdateAsync(_timeEntry).Throws(new InvalidObjectException());

            await Assert.ThrowsAsync <InvalidObjectException>(() => _controller.UpdateAsync(_timeEntry));
        }
        public async Task <TimeEntryDto> UpdateAsync(TimeEntryDto timeEntry)
        {
            await _validationService.ValidateUpdateAsync(timeEntry);

            return(await _timeEntryRepository.UpdateAsync(timeEntry));
        }