Windows Phone 8.1 Unit Testing -


i have windows 8.1 universal application have run issue unit testing. using mstest. have test needs make sure exception thrown. test pretty simple, if null value if passed in, fails. exception thrown should argumentnullexception. however, having trouble finding correct way pass. tried using expectedexpection attribute unable find reference work windows phone unit test project. did find assert.throwsexception not able find information on how use it.

what best way make sure exception being thrown , test pass if thrown?

in mstest use expectedexception this:

    [testmethod]     [expectedexception(typeof(argumentnullexception))]     public void testmethod1()     {         dowhateverthrowsanargumentnullexception();     } 

if don't way can @ project on github: mstestextensions


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -