Tag Archives | Unit Testing

Make Unit Testing Easier: Quicker Testing of Exceptions in Constructors

Over recent months I’ve found that I’ve been doing a lot of repetitive unit testing around ensuring that ArgumentNullExceptions are thrown on constructors. To combat this boiler plate code I wrote a quick test helper which goes through each constructor argument, and tests that they throw the exception:

You use this method within your […]

Continue Reading 2