mardi 4 août 2015

How to write a test that ensures if all methods throw an exception

I have several methods that expect an instance of an interface ITable. Now I´m not sure if it is worth the effort of creating a test for this parameter for every method, this seems like a break on DRY.

So I wonder if there is a possibilty to call all those methods within one single test-method and assert that all of them fail for the same reason - in my case an ArgumentException.

Aucun commentaire:

Enregistrer un commentaire