다음을 통해 공유


TestExecutionContext 클래스

네임스페이스: Microsoft.Azure.Workflows.UnitTesting.Definitions

이 클래스는 단일 테넌트 Azure Logic Apps에서 표준 워크플로 테스트에 사용되는 단위 테스트에 대한 실행 컨텍스트를 제공합니다. 이 클래스는 테스트 실행 중에 상태를 유지하는 데 도움이 되며 현재 워크플로 상태에 따라 다르게 응답하는 동적 모의 항목을 만들려는 경우에 유용합니다.

사용법

var actionMock = new CallExternalSystemsActionMock(name: "Call_External_Systems", onGetActionMock: (testExecutionContext) =>
{
    return new CallExternalSystemsActionMock(
        status: TestWorkflowStatus.Succeeded,
        outputs: new CallExternalSystemsActionOutput {
            Body = new JObject
            {
                { "name", testExecutionContext.ActionContext.ActionName },
                { "inputs", testExecutionContext.ActionContext.ActionInputs },
                { "scope", testExecutionContext.ActionContext.ParentActionName },
                { "iteration", testExecutionContext.ActionContext.CurrentIterationInput.Index }
            }
        }
    );
});

속성

이름 설명 유형 필수
ActionContext 현재 작업 컨텍스트를 가져옵니다. TestActionExecutionContext