Пример #1
0
        public void Setup()
        {
            _validator = new DeleteCommitmentValidator();
            _handler   = new DeleteCommitmentCommandHandler(Mock.Of <ICommitmentRepository>(), _validator, Mock.Of <ICommitmentsLogger>(), Mock.Of <IApprenticeshipEvents>(), Mock.Of <IHistoryRepository>());

            _validCommand = new DeleteCommitmentCommand {
                CommitmentId = 2, Caller = new Domain.Caller {
                    Id = 123, CallerType = Domain.CallerType.Provider
                }
            };
        }
        public void Setup()
        {
            _validCommand = new DeleteCommitmentCommand()
            {
                UserId       = "user123",
                ProviderId   = 111L,
                CommitmentId = 123L
            };

            _mockCommitmentsApi = new Mock <IProviderCommitmentsApi>();
            _handler            = new DeleteCommitmentCommandHandler(new DeleteCommitmentCommandValidator(), _mockCommitmentsApi.Object);
        }
Пример #3
0
        public void Setup()
        {
            _validCommand = new DeleteCommitmentCommand
            {
                UserId           = "user123",
                ProviderId       = 111L,
                CommitmentId     = 123L,
                UserDisplayName  = "Bob",
                UserEmailAddress = "*****@*****.**"
            };

            _mockCommitmentsApi = new Mock <IProviderCommitmentsApi>();
            _handler            = new DeleteCommitmentCommandHandler(new DeleteCommitmentCommandValidator(), _mockCommitmentsApi.Object);
        }
Пример #4
0
        public void Setup()
        {
            _mockCommitmentRepository = new Mock <ICommitmentRepository>();
            _mockApprenticeshipEvents = new Mock <IApprenticeshipEvents>();
            _mockHistoryRepository    = new Mock <IHistoryRepository>();
            _validator = new DeleteCommitmentValidator();
            _handler   = new DeleteCommitmentCommandHandler(_mockCommitmentRepository.Object, _validator, Mock.Of <ICommitmentsLogger>(), _mockApprenticeshipEvents.Object, _mockHistoryRepository.Object);

            _validCommand = new DeleteCommitmentCommand {
                CommitmentId = 2, Caller = new Domain.Caller {
                    Id = 123, CallerType = Domain.CallerType.Provider
                }, UserId = "User", UserName = "******"
            };
        }