TestStore_Step - mbrandonw/swift-composable-architecture GitHub Wiki
DEBUG
-
A single step of a
TestStore
assertion.public struct Step
DEBUG
-
private init(_ type: StepType, file: StaticString = #file, line: UInt = #line)
DEBUG
-
let type: StepType
DEBUG
-
let file: StaticString
DEBUG
-
let line: UInt
DEBUG
-
A step that describes an action sent to a store and asserts against how the store's state is expected to change.
public static func send(_ action: LocalAction, file: StaticString = #file, line: UInt = #line, _ update: @escaping (inout LocalState) -> Void = { _ in }) -> Step
- action: - action: An action to send to the test store.
- update: - update: A function that describes how the test store's state is expected to change.
A step that describes an action sent to a store and asserts against how the store's state is expected to change.
DEBUG
-
A step that describes an action received by an effect and asserts against how the store's state is expected to change.
public static func receive(_ action: Action, file: StaticString = #file, line: UInt = #line, _ update: @escaping (inout LocalState) -> Void = { _ in }) -> Step
- action: - action: An action the test store should receive by evaluating an effect.
- update: - update: A function that describes how the test store's state is expected to change.
A step that describes an action received by an effect and asserts against how the store's state is expected to change.
DEBUG
-
A step that updates a test store's environment.
public static func environment(file: StaticString = #file, line: UInt = #line, _ update: @escaping (inout Environment) -> Void) -> Step
- update: - update: A function that updates the test store's environment for subsequent steps.
A step that updates a test store's environment.
DEBUG
-
A step that captures some work to be done between assertions
public static func `do`(file: StaticString = #file, line: UInt = #line, _ work: @escaping () -> Void) -> Step
- work: - work: A function that is called between steps.
A step that captures some work to be done between assertions.