Test if exception is thrown within NUnit 3
If you want to test your code indeed throws an exception within a certain position, NUnit provides possibilities to test if indeed an exception is thrown. Before NUnit 3 you simply added the attribute ExpectedException(typeof()) as the following example shows:
Read More…
Posted in Unit testing at August 1st, 2017. No Comments.