diff --git a/WorkflowCombine/Testing/PublisherTesting.swift b/WorkflowCombine/Testing/PublisherTesting.swift index 1802a2f21..d9ce15fe1 100644 --- a/WorkflowCombine/Testing/PublisherTesting.swift +++ b/WorkflowCombine/Testing/PublisherTesting.swift @@ -22,9 +22,9 @@ import XCTest @testable import WorkflowCombine -@available(macOS 10.15, *) -@available(iOS 13.0, *) -extension RenderTester { + @available(macOS 10.15, *) + @available(iOS 13.0, *) + extension RenderTester { /// Expect a `Publisher`s. /// /// `PublisherWorkflow` is used to subscribe to `Publisher`s. @@ -32,7 +32,7 @@ extension RenderTester { /// - Parameters: /// - producingOutput: An output that should be returned when this worker is requested, if any. /// - key: Key to expect this `Workflow` to be rendered with. - public func expectPublisher( + public func expect( publisher: PublisherType.Type, output: PublisherType.Output, key: String = "" diff --git a/WorkflowCombine/TestingTests/PublisherTests.swift b/WorkflowCombine/TestingTests/PublisherTests.swift index 62e1dedc5..f8418f8bc 100644 --- a/WorkflowCombine/TestingTests/PublisherTests.swift +++ b/WorkflowCombine/TestingTests/PublisherTests.swift @@ -17,7 +17,7 @@ class PublisherTests: XCTestCase { func testPublisherWorkflow() { TestWorkflow() .renderTester() - .expectPublisher(publisher: Publishers.Sequence<[Int], Never>.self, output: 1, key: "123") + .expect(publisher: Publishers.Sequence<[Int], Never>.self, output: 1, key: "123") .render {} } diff --git a/WorkflowConcurrency/Testing/TaskTesting.swift b/WorkflowConcurrency/Testing/TaskTesting.swift index 7b7f0fb1e..40a3b2eb3 100644 --- a/WorkflowConcurrency/Testing/TaskTesting.swift +++ b/WorkflowConcurrency/Testing/TaskTesting.swift @@ -32,7 +32,7 @@ /// - Parameters: /// - producingOutput: An output that should be returned when this worker is requested, if any. /// - key: Key to expect this `Workflow` to be rendered with. - public func expectTask( + public func expect( task: Task.Type, output: Value, key: String = "" diff --git a/WorkflowConcurrency/TestingTests/TaskTests.swift b/WorkflowConcurrency/TestingTests/TaskTests.swift index dae70405e..9dbd63b57 100644 --- a/WorkflowConcurrency/TestingTests/TaskTests.swift +++ b/WorkflowConcurrency/TestingTests/TaskTests.swift @@ -25,7 +25,7 @@ class TaskTests: XCTestCase { func testTaskWorkflow() { TestWorkflow() .renderTester() - .expectTask(task: Task.self, output: 1, key: "123") + .expect(task: Task.self, output: 1, key: "123") .render {} }