Skip to content

Code Snippets

Kota edited this page Feb 19, 2019 · 13 revisions

Unit tests for Exceptions

[TestMethod]
[ExpectedException(typeof(ArgumentException), "A userId of null was inappropriately allowed.")]
public void NullUserIdInConstructor()
{
   LogonInfo logonInfo = new LogonInfo(null, "P@ss0word");
}

Clone this wiki locally