public CreateRemarkCommandHandler(IRemarkWriteRepository remarkWriteRepository, IIdentifierProvider identifierProvider, IVersionProvider versionProvider) { _remarkWriteRepository = remarkWriteRepository ?? throw Error.ArgumentNull(nameof(remarkWriteRepository)); _identifierProvider = identifierProvider ?? throw Error.ArgumentNull(nameof(identifierProvider)); _versionProvider = versionProvider ?? throw Error.ArgumentNull(nameof(versionProvider)); }
public UpdateRemarkCommandHandler(IRemarkWriteRepository remarkWriteRepository, IRemarkReadRepository remarkReadRepository, IVersionProvider versionProvider) { _remarkWriteRepository = remarkWriteRepository ?? throw Error.ArgumentNull(nameof(remarkWriteRepository)); _remarkReadRepository = remarkReadRepository ?? throw Error.ArgumentNull(nameof(remarkReadRepository)); _versionProvider = versionProvider ?? throw Error.ArgumentNull(nameof(versionProvider)); }
public void ConstructorShouldFailWhenRemarkWriteRepositoryIsNull() { // Arrange IRemarkWriteRepository remarkWriteRepository = null; // Act Action ctor = () => { new DeleteRemarkCommandHandler(remarkWriteRepository); }; // Assert ctor.Should().Throw <ArgumentNullException>(); }
public void ConstructorShouldFailWhenRemarkWriteRepositoryIsNull() { // Arrange IRemarkWriteRepository remarkWriteRepository = null; var remarkReadRepository = new Mock <IRemarkReadRepository>().Object; var versionProvider = new Mock <IVersionProvider>().Object; // Act Action ctor = () => { new UpdateRemarkCommandHandler(remarkWriteRepository, remarkReadRepository, versionProvider); }; // Assert ctor.Should().Throw <ArgumentNullException>(); }
public DeleteRemarkCommandHandler(IRemarkWriteRepository remarkWriteRepository) { _remarkWriteRepository = remarkWriteRepository ?? throw Error.ArgumentNull(nameof(remarkWriteRepository)); }
public void TestInitialize() { RepositoryTestsHelper.Init(Consts.Collections.RemarkCollectionName); _repository = new RemarkWriteRepository(new PersistenceContext(new PersistenceConfiguration(RepositoryTestsHelper.ConnectionString))); }