[removedAfterProceeding] - Adds implementation for complete in WorkflowExampleTests MockOrchestrationResponder - MW
MODIFY
Tests/WorkflowExampleTests/Mocks/MockOrchestrationResponder.swift
Tests/WorkflowExampleTests/Mocks/MockOrchestrationResponder.swift
@@ -10,8 +10,17 @@ import Foundation
import Workflow
class MockOrchestrationResponder: OrchestrationResponder {
+ var completeCalled = 0
+ var lastPassedArgs: AnyWorkflow.PassedArgs?
+ var lastCompleteOnFinish: ((AnyWorkflow.PassedArgs) -> Void)?
+ var complete_EnableDefaultImplementation = false
func complete(_ workflow: AnyWorkflow, passedArgs: AnyWorkflow.PassedArgs, onFinish: ((AnyWorkflow.PassedArgs) -> Void)?) {
+ lastWorkflow = workflow
+ lastPassedArgs = passedArgs
+ lastCompleteOnFinish = onFinish
+ completeCalled += 1
+ if complete_EnableDefaultImplementation { onFinish?(passedArgs) }
}
var launchCalled = 0

[removedAfterProceeding] - Adds implementation for complete in WorkflowExampleTests MockOrchestrationResponder - MW