3 ms·
It's the overall experience that is great. Creating a stub or a mock with just: IMyService myService = Stub() // Mock() Returning something from the stub: myS
by tigershark 9y ago
It'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.