public async Task Then_The_Service_Is_Called_With_The_Request_Sign_The_Agreement(
            SignAgreementCommand command,
            [Frozen] Mock <IEmployerIncentivesService> employerIncentivesService,
            SignAgreementCommandHandler handler)
        {
            await handler.Handle(command, CancellationToken.None);

            employerIncentivesService.Verify(x => x.SignAgreement(command.AccountId, command.AccountLegalEntityId, It.Is <SignAgreementRequest>(y => y.AgreementVersion == command.AgreementVersion)), Times.Once);
        }
Exemple #2
0
        public async Task Then_The_Service_Is_Called_With_The_Request_Sign_The_Agreement(
            SignAgreementCommand command,
            [Frozen] Mock <ILegalEntitiesService> legalEntitiesService,
            SignAgreementCommandHandler handler)
        {
            await handler.Handle(command, CancellationToken.None);

            legalEntitiesService.Verify(x => x.SignAgreement(It.Is <SignAgreementRequest>(
                                                                 y => y.AgreementVersion == command.AgreementVersion &&
                                                                 y.AccountId == command.AccountId &&
                                                                 y.AccountLegalEntityId == command.AccountLegalEntityId &&
                                                                 y.LegalEntityId == command.LegalEntityId &&
                                                                 y.LegalEntityName == command.LegalEntityName
                                                                 )), Times.Once);
        }