Exemplo n.º 1
0
        public void Setup()
        {
            _fixture                  = new Fixture();
            _collectionPeriod         = _fixture.Create <CollectionPeriod>();
            _mockOrchestrationContext = new Mock <IDurableOrchestrationContext>();

            _payableLegalEntities = _fixture.CreateMany <PayableLegalEntityDto>(3).ToList();

            _mockOrchestrationContext.Setup(x => x.CallActivityAsync <List <PayableLegalEntityDto> >(nameof(GetPayableLegalEntities), _collectionPeriod)).ReturnsAsync(_payableLegalEntities);
            _mockOrchestrationContext.Setup(x => x.CallActivityAsync <List <ClawbackLegalEntityDto> >(nameof(GetUnsentClawbacks), _collectionPeriod)).ReturnsAsync(new List <ClawbackLegalEntityDto>());
            _mockOrchestrationContext.Setup(x => x.CallActivityAsync <CollectionPeriod> (nameof(GetActiveCollectionPeriod), null)).ReturnsAsync(_collectionPeriod);

            _mockLogger = new Mock <ILogger <IncentivePaymentOrchestrator> >();

            _orchestrator = new IncentivePaymentOrchestrator(_mockLogger.Object);
        }