STRUCT
RenderTesterResult¶
public struct RenderTesterResult<WorkflowType: Workflow>
The result of a RenderTester rendering. Used to verify state, output, and actions that were produced as a result of
actions performed during the render (such as child workflow output being produced).
Methods¶
verifyState(file:line:assertions:)¶
public func verifyState(
    file: StaticString = #file,
    line: UInt = #line,
    assertions: (WorkflowType.State) throws -> Void
) rethrows -> RenderTesterResult<WorkflowType>
Allows for assertions against the resulting state.
assertNoAction(file:line:)¶
public func assertNoAction(
    file: StaticString = #file,
    line: UInt = #line
) -> RenderTesterResult<WorkflowType>
Asserts that no actions were produced
verifyAction(type:file:line:assertions:)¶
public func verifyAction<ActionType: WorkflowAction>(
    type: ActionType.Type = ActionType.self,
    file: StaticString = #file,
    line: UInt = #line,
    assertions: (ActionType) throws -> Void
) rethrows -> RenderTesterResult<WorkflowType> where ActionType.WorkflowType == WorkflowType
Allows for assertions agains the resulting action
assert(action:file:line:)¶
public func assert<ActionType: WorkflowAction>(
    action: ActionType,
    file: StaticString = #file,
    line: UInt = #line
) -> RenderTesterResult<WorkflowType> where ActionType.WorkflowType == WorkflowType, ActionType: Equatable
Asserts that the resulting action is equal to the given action.
assertNoOutput(file:line:)¶
public func assertNoOutput(
    file: StaticString = #file,
    line: UInt = #line
) -> RenderTesterResult<WorkflowType>
Asserts that no output was produced.
verifyOutput(file:line:assertions:)¶
public func verifyOutput(
    file: StaticString = #file,
    line: UInt = #line,
    assertions: (WorkflowType.Output) throws -> Void
) rethrows -> RenderTesterResult<WorkflowType>
Allows for assertions agains the resulting output