/// <summary> <see cref="IDependentDomain.UpdateAsync"/> </summary> /// <exception cref="ArgumentNullException"><paramref name="domainModel"/> is <see langword="null"/></exception> public async Task <DependentDomainModel> UpdateAsync(DependentDomainModel domainModel) { if (domainModel == null) { throw new ArgumentNullException(nameof(domainModel)); } var model = ToModel <Dependent, DependentDomainModel>(domainModel); model = await _repository.UpdateAsync(model).ConfigureAwait(false); domainModel = ToModel <DependentDomainModel, Dependent>(model); return(domainModel); }
public void UpdateAsync_WithNullDependentParameter_ReturnArgumentNullException() { Func <Task> act = () => _repository.UpdateAsync(null); act.Should().Throw <ArgumentNullException>(); }