コード例 #1
0
        public async Task Update([ActivityTrigger] LearnerChangeOfCircumstanceInput input)
        {
            _logger.LogInformation("Calling Learner Change of Circumstance for apprenticeship incentive id {apprenticeshipIncentiveId}, uln {uln}", input.ApprenticeshipIncentiveId, input.Uln);
            await _commandDispatcher.Send(new LearnerChangeOfCircumstanceCommand(input.ApprenticeshipIncentiveId));

            _logger.LogInformation("Called Learner Change of Circumstance for apprenticeship incentive id {apprenticeshipIncentiveId}, uln {uln}", input.ApprenticeshipIncentiveId, input.Uln);
        }
        public void Setup()
        {
            _fixture = new Fixture();
            _changeOfCircumstanceInput = _fixture.Create <LearnerChangeOfCircumstanceInput>();
            _mockOrchestrationContext  = new Mock <IDurableOrchestrationContext>();
            _mockOrchestrationContext.Setup(x => x.GetInput <LearnerChangeOfCircumstanceInput>()).Returns(_changeOfCircumstanceInput);

            _mockOrchestrationContext.Setup(x => x.CallActivityAsync <bool>("ApprenticeshipIncentiveHasPossibleChangeOrCircs", _changeOfCircumstanceInput.ApprenticeshipIncentiveId)).ReturnsAsync(true);
            _orchestrator = new ChangeOfCircumstanceOrchestrator(Mock.Of <ILogger <ChangeOfCircumstanceOrchestrator> >());
        }