Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

assert throw

[TestMethod()]
public void ExceptionTest()
{
    String testStr = null;
    MyAssert.Throws<NullReferenceException>(() => testStr.ToUpper());
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #assert #throw
ADD COMMENT
Topic
Name
7+3 =