public void ConstructorShouldFailWhenOperatorWriteRepositoryIsNull() { // Arrange IOperatorWriteRepository operatorWriteRepository = null; // Act Action ctor = () => { new CreateOperatorCommandHandler(operatorWriteRepository); }; // Assert ctor.Should().Throw <ArgumentNullException>(); }
public void TestInitialize() { RepositoryTestsHelper.Init(Consts.Collections.Operators); _repository = new OperatorWriteRepository(new PersistenceContext(new PersistenceConfiguration(RepositoryTestsHelper.ConnectionString))); }
public CreateOperatorCommandHandler(IOperatorWriteRepository operatorWriteRepository) { _operatorWriteRepository = operatorWriteRepository ?? throw Error.ArgumentNull(nameof(operatorWriteRepository)); }
public DeleteOperatorCommandHandler(ITeamReadRepository teamReadRepository, ITeamWriteRepository teamWriteRepository, IOperatorWriteRepository operatorWriteRepository) { _teamReadRepository = teamReadRepository ?? throw new ArgumentNullException(nameof(teamReadRepository)); _teamWriteRepository = teamWriteRepository ?? throw new ArgumentNullException(nameof(teamWriteRepository)); _operatorWriteRepository = operatorWriteRepository ?? throw new ArgumentNullException(nameof(operatorWriteRepository)); }