EXTENSION
RenderTesterResult
¶
extension RenderTesterResult where WorkflowType.State: Equatable
Methods¶
assert(state:file:line:)
¶
public func assert(
state expectedState: WorkflowType.State,
file: StaticString = #file,
line: UInt = #line
) -> RenderTesterResult<WorkflowType>
Verifies that the resulting state is equal to the given state.
assertStateModifications(file:line:_:)
¶
public func assertStateModifications(
file: StaticString = #file,
line: UInt = #line,
_ modifications: (inout WorkflowType.State) throws -> Void
) rethrows -> RenderTesterResult<WorkflowType>
Exhaustive state testing against the initial state. - Parameters: - modifications: A function that receives the initial state and is expected to mutate it to match the new state.
Parameters¶
Name | Description |
---|---|
modifications | A function that receives the initial state and is expected to mutate it to match the new state. |
assert(output:file:line:)
¶
public func assert(
output expectedOutput: WorkflowType.Output,
file: StaticString = #file,
line: UInt = #line
) -> RenderTesterResult<WorkflowType>
Verifies that the resulting output is equal to the given output.