public CreateOperationCommandHandler(IOperationWriteRepository operationWriteRepository, IIdentifierProvider identifierProvider, IVersionProvider versionProvider) { _operationWriteRepository = operationWriteRepository ?? throw Error.ArgumentNull(nameof(operationWriteRepository)); _identifierProvider = identifierProvider ?? throw Error.ArgumentNull(nameof(identifierProvider)); _versionProvider = versionProvider ?? throw Error.ArgumentNull(nameof(versionProvider)); }
public UpdateOperationCommandHandler(IOperationWriteRepository operationWriteRepository, IOperationReadRepository operationReadRepository, IVersionProvider versionProvider) { _operationWriteRepository = operationWriteRepository ?? throw Error.ArgumentNull(nameof(operationWriteRepository)); _operationReadRepository = operationReadRepository ?? throw Error.ArgumentNull(nameof(operationReadRepository)); _versionProvider = versionProvider ?? throw Error.ArgumentNull(nameof(versionProvider)); }
public void ConstructorShouldFailWhenOperationWriteRepositoryIsNull() { // Arrange IOperationWriteRepository operationWriteRepository = null; // Act Action ctor = () => { new DeleteOperationCommandHandler(operationWriteRepository); }; // Assert ctor.Should().Throw <ArgumentNullException>(); }
public void ConstructorShouldFailWhenOperationWriteRepositoryIsNull() { // Arrange IOperationWriteRepository operationWriteRepository = null; var identifierProvider = new Mock <IIdentifierProvider>().Object; var versionProvider = new Mock <IVersionProvider>().Object; // Act Action ctor = () => { new CreateOperationCommandHandler(operationWriteRepository, identifierProvider, versionProvider); }; // Assert ctor.Should().Throw <ArgumentNullException>(); }
public void TestInitialize() { RepositoryTestsHelper.Init(Consts.Collections.OperationCollectionName); _repository = new OperationWriteRepository(new PersistenceContext(new PersistenceConfiguration(RepositoryTestsHelper.ConnectionString))); }
public DeleteOperationCommandHandler(IOperationWriteRepository operationWriteRepository) { _operationWriteRepository = operationWriteRepository ?? throw Error.ArgumentNull(nameof(operationWriteRepository)); }