Saturday, September 24, 2016

Write a test for an exception of a particular shape in C#.

[ExpectedException(typeof(Exception), "Whatever")]

...goes below the [TestMethod] attribute, setting the expectation that the test will blow up in this way. "Whatever" herein represents the exception message.

No comments:

Post a Comment