Answers for "test how catch exception c#"

C#
1

test how catch exception c#

[TestMethod]
[ExpectedException(typeof(ArgumentException),
    "A userId of null was inappropriately allowed.")]
public void NullUserIdInConstructor()
{
   LogonInfo logonInfo = new LogonInfo(null, "P@ss0word");
}
Posted by: Guest on March-02-2020

C# Answers by Framework

Browse Popular Code Answers by Language