public async Task CanSaveAsync() { var expected = new TimeEntryDto(); _repository.SaveAsync(_timeEntry).Returns(expected); var actual = await _controller.SaveAsync(_timeEntry); actual.Should().Be(expected); }
public async Task <TimeEntryDto> SaveAsync([FromBody] TimeEntryDto timeEntry) { await _validationService.ValidateSaveAsync(timeEntry); return(await _timeEntryRepository.SaveAsync(timeEntry)); }