Reputation: 9414
For example, I have a type which implements IDictionary, and I need test coverage to ensure that it does it properly. I just wondered if there is a repository of standard, reusable tests for this kind of thing anywhere; if there isn't, I might create one.
Upvotes: 16
Views: 321
Reputation: 9414
I couldn't find anything which specifically met this need, so I made it. I've created a Github repo and added my IDictionary<TKey,TValue> test to it; hopefully people will fork and contribute more tests.
https://github.com/markrendle/InterfaceTests.Net
Upvotes: 1
Reputation: 26599
I doubt there's a publicly available .net one, but the Mono project might be a good place to start?
Whether they're testing "the contract" of the interface, or the specific implementation, I'm not sure, but there's certainly tests for the Dictionary class:
Upvotes: 7