2 ms·
I once got so frustrated with the horribly arcane syntax of all .NET mocking libraries that I made my own, FakeThat[0]. It's unoptimized and not very full featu
by skrebbel 10y ago
I once got so frustrated with the horribly arcane syntax of all .NET mocking libraries that I made my own, FakeThat[0]. It's unoptimized and not very full featured, but it's very easy to use.
The idea is that you don't need to learn yet another domain specific language just to do some assertions on mock call history. So I expose it all as plain old C# data, LINQ'able and all that, which means you can just use the assertion library of choice instead of weird mock-library-specific "verify" methods. The API gets you great autocomplete in IDEs because of static typing, so you discover the API just by starting to type.
Intellisense-driven discoverability of APIs is one of the great USPs of C# and Java programming (compared to most other popular languages), and IMO it's a shame that more TDD related libraries don't make good use of it.
It's not under active development but I'd be willing to take it up again if there's interest. Would love some HN feedback!
[0] https://github.com/eteeselink/fakethat https://github.com/eteeselink/fakethat
- keithly 10y agoUSP = Unique Selling Proposition For anyone who wonders what USP means (like I did).