File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Sources/Mockable/Builder/FunctionBuilders Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,8 @@ public struct ThrowingFunctionReturnBuilder<
7171 /// - Parameter result: The result type wrapping a value or error.
7272 /// - Returns: The parent builder, used for chaining additional specifications.
7373 @discardableResult
74- public func willHandleResult ( _ result: Result < ReturnType , ErrorType > ) -> ParentBuilder {
74+ public func willHandle ( _ result: Result < ReturnType , ErrorType > ) -> ParentBuilder {
7575 switch result {
76-
7776 case let . success( value) :
7877 mocker. addReturnValue ( . return( value) , for: member)
7978 case let . failure( error) :
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ final class GivenTests: XCTestCase {
283283
284284 given ( mock)
285285 . getUser ( for: . any)
286- . willHandleResult ( result)
286+ . willHandle ( result)
287287
288288 let actual = try mock. getUser ( for: . init( ) )
289289
@@ -296,7 +296,7 @@ final class GivenTests: XCTestCase {
296296
297297 given ( mock)
298298 . getUser ( for: . any)
299- . willHandleResult ( result)
299+ . willHandle ( result)
300300
301301 XCTAssertThrowsError ( try mock. getUser ( for: . init( ) ) )
302302 }
You can’t perform that action at this time.
0 commit comments