Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Unit Tests Checking Exceptions #2

Open
JoshKeegan opened this issue Dec 15, 2014 · 1 comment
Open

Clean up Unit Tests Checking Exceptions #2

JoshKeegan opened this issue Dec 15, 2014 · 1 comment

Comments

@JoshKeegan
Copy link
Owner

Unit Tests that check Exceptions are being thrown (and that it's correct type of Exception) are currently done with try...catch blocks and Assert.Fail() in a relevant place.

Switch to using the ExpectedException syntax throughout.

@JoshKeegan
Copy link
Owner Author

Note that ExpectedException support has been dropped in the latest version of NUnit. Whilst the unit testing framework currently being used in the Microsoft one, if ever cross-platform compatibility is wanted, then using ExpectedException could make it more difficult to port the unit tests to a different framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant