4 ms·
What do you miss that's not in F#? Legitimately curious, since F# is the language I miss (or wish to use, I suppose) the most at the moment.
by dvlsg 9y ago
What do you miss that's not in F#? Legitimately curious, since F# is the language I miss (or wish to use, I suppose) the most at the moment.
- tigershark 9y agoIt's the overall experience that is great. Creating a stub or a mock with just: IMyService myService = Stub() // Mock() Returning something from the stub: myService.getData() >> data verifying the returned value without explicit assert: result == expected (This will show a very informative error in case of mismatch and gives you the ability to see the differences in a diff style window) Interaction based testing is a breeze with this: 3 * myService.getData() 1 * myOtherService.getData() And finally the data driven testing is the most natural that I have ever seen. You just need to literally create a table and use the column name in your test or even in your test title. Writing tests becomes a joy with Spock. In F# I have looked at expecto, fsunit and some other library, but I can't find anything remotely equivalent.