Created
September 13, 2018 14:17
-
-
Save csharpforevermore/03ef32a529bb7d473363b80c5e1f596e 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
Source 1
Source 2