public async Task RunWorkflowAsyncShouldSetWorkflowStatusToFinished(FinishWorkflow sut)
        {
            var runWorkflowResult = await WorkflowRunner.BuildAndStartWorkflowAsync(sut);

            var workflowInstance = runWorkflowResult.WorkflowInstance !;

            Assert.Equal(WorkflowStatus.Finished, workflowInstance.WorkflowStatus);
        }
Beispiel #2
0
        public async Task RunWorkflowAsyncShouldReturnExpectedOutput([Frozen] object expectedOutput, FinishWorkflow sut)
        {
            var workflowInstance = await WorkflowRunner.BuildAndStartWorkflowAsync(sut);

            var actualOutput = (workflowInstance.Output as FinishOutput)?.Output;

            Assert.Same(expectedOutput, actualOutput);
        }
Beispiel #3
0
        public async Task RunWorkflowAsyncShouldReturnExpectedOutput([Frozen] object expectedOutput, FinishWorkflow sut)
        {
            var runWorkflowResult = await WorkflowBuilderAndStarter.BuildAndStartWorkflowAsync(sut);

            var workflowInstance      = runWorkflowResult.WorkflowInstance !;
            var actualOutputReference = workflowInstance.Output !;
            var actualOutput          = (FinishOutput)(await WorkflowStorageService.LoadAsync(actualOutputReference.ProviderName, new WorkflowStorageContext(workflowInstance, workflowInstance.LastExecutedActivityId !), "Output")) !;

            Assert.Same(expectedOutput, actualOutput.Output);
        }