Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

xunit setup throw exception


Mock<ISomeObj> someObj = new Mock<ISomeObj>();

//NOTE the Throws method
someObj.Setup(s => s.Get())
  .Throws(new IOException());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #xunit #setup #throw #exception
ADD COMMENT
Topic
Name
4+6 =