Created
September 13, 2018 14:17
-
-
Save csharpforevermore/fe429d7a3ec45af681ed31c482d3c964 to your computer and use it in GitHub Desktop.
Use Assert to verify that an exception has been thrown?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
[ExpectedException(typeof(ArgumentException), | |
"A userId of null was inappropriately allowed.")] | |
public void NullUserIdInConstructor() | |
{ | |
LogonInfo logonInfo = new LogonInfo(null, "P@ss0word"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment