Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unnecessary nested generic type #270

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WorkflowTesting/Sources/Internal/RenderExpectations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extension RenderTester {
}

extension RenderTester {
internal class ExpectedSideEffect<WorkflowType: Workflow> {
internal class ExpectedSideEffect {
let key: AnyHashable
let file: StaticString
let line: UInt
Expand All @@ -62,7 +62,7 @@ extension RenderTester {
func apply<ContextType>(context: ContextType) where ContextType: RenderContextType, ContextType.WorkflowType == WorkflowType {}
}

internal final class ExpectedSideEffectWithAction<WorkflowType, ActionType: WorkflowAction>: ExpectedSideEffect<WorkflowType> where ActionType.WorkflowType == WorkflowType {
internal final class ExpectedSideEffectWithAction<ActionType: WorkflowAction>: ExpectedSideEffect where ActionType.WorkflowType == WorkflowType {
let action: ActionType

internal init(key: AnyHashable, action: ActionType, file: StaticString, line: UInt) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extension RenderTester {
internal final class TestContext: RenderContextType {
var state: WorkflowType.State
var expectedWorkflows: [AnyExpectedWorkflow]
var expectedSideEffects: [AnyHashable: ExpectedSideEffect<WorkflowType>]
var expectedSideEffects: [AnyHashable: ExpectedSideEffect]
var appliedAction: AppliedAction<WorkflowType>?
var producedOutput: WorkflowType.Output?
let file: StaticString
Expand All @@ -34,7 +34,7 @@ extension RenderTester {
internal init(
state: WorkflowType.State,
expectedWorkflows: [AnyExpectedWorkflow],
expectedSideEffects: [AnyHashable: ExpectedSideEffect<WorkflowType>],
expectedSideEffects: [AnyHashable: ExpectedSideEffect],
file: StaticString,
line: UInt
) {
Expand Down
4 changes: 2 additions & 2 deletions WorkflowTesting/Sources/WorkflowRenderTester.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public struct RenderTester<WorkflowType: Workflow> {
let state: WorkflowType.State

private let expectedWorkflows: [AnyExpectedWorkflow]
private let expectedSideEffects: [AnyHashable: ExpectedSideEffect<WorkflowType>]
private let expectedSideEffects: [AnyHashable: ExpectedSideEffect]

init(
workflow: WorkflowType,
state: WorkflowType.State,
expectedWorkflows: [AnyExpectedWorkflow] = [],
expectedSideEffects: [AnyHashable: ExpectedSideEffect<WorkflowType>] = [:]
expectedSideEffects: [AnyHashable: ExpectedSideEffect] = [:]
) {
self.workflow = workflow
self.state = state
Expand Down
Loading