public void ConstructorShouldFailWhenOperatorWriteRepositoryIsNull()
        {
            // Arrange
            IOperatorWriteRepository operatorWriteRepository = null;

            // Act
            Action ctor = () =>
            {
                new CreateOperatorCommandHandler(operatorWriteRepository);
            };

            // Assert
            ctor.Should().Throw <ArgumentNullException>();
        }
Esempio n. 2
0
 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));
 }
Esempio n. 4
0
 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));
 }