public void SetUp()
        {
            Validator = new ProviderApproveCohortCommandValidator();
            Command   = new ProviderApproveCohortCommand {
                Caller = new Caller(213, CallerType.Provider), CommitmentId = 123, LastUpdatedByName = "Test", LastUpdatedByEmail = "*****@*****.**", Message = "Some text"
            };
            SetUpCommonMocks();
            Commitment            = CreateCommitment(Command.CommitmentId, 11234, Command.Caller.Id);
            Commitment.EditStatus = EditStatus.ProviderOnly;
            Account = CreateAccount(Commitment.EmployerAccountId, ApprenticeshipEmployerType.Levy);
            CommitmentRepository.Setup(x => x.GetCommitmentById(Command.CommitmentId)).ReturnsAsync(Commitment);
            EmployerAccountsService.Setup(x => x.GetAccount(Commitment.EmployerAccountId)).ReturnsAsync(Account);
            SetupSuccessfulOverlapCheck();
            V2EventsPublisher.Setup(x => x.SendProviderApproveCohortCommand(It.IsAny <long>(), It.IsAny <string>(), It.IsAny <UserInfo>()))
            .Returns(Task.CompletedTask);

            Target = new ProviderApproveCohortCommandHandler(Validator,
                                                             CommitmentRepository.Object,
                                                             V2EventsPublisher.Object);
        }
 public CommitmentsController(CommitmentRepository commitments, StateCache state)
 {
     Commitments = commitments;
     State       = state;
 }
Beispiel #3
0
 public CommitmentBiz()
 {
     oApproveRepository    = new ApproveRepository();
     oCommitmentRepository = new CommitmentRepository();
 }