danielsaidi / MockingKit

MockingKit is a Swift SDK that lets you easily mock protocols and classes in `Swift`.
MIT License
87 stars 7 forks source link

Improved function arguments #2

Closed danielsaidi closed 4 years ago

danielsaidi commented 5 years ago

When you call registerResult and executions(for:), you have to specify the function like this:

mock.registerResult(for: mock.functionWithIntResult) { arg1, arg2 in return arg2 }

It would be a lot cleaner if we could use the following syntax:

mock.registerResult(for: .functionWithIntResult) { arg1, arg2 in return arg2 }

I don't know if it's possible, but it would be great!

danielsaidi commented 4 years ago

I won't focus on fixing this.