Code snippet for asserting throw in ArgumentException and its derived types(such as ArgumentNullException) in Nunit -
public void Test(){
Assert.Throws(Is.InstanceOf<ArgumentException>(), () =>{
//SUT code
});
}
Code snippet for asserting throw in ArgumentException and its derived types(such as ArgumentNullException) in Nunit -
public void Test(){
Assert.Throws(Is.InstanceOf<ArgumentException>(), () =>{
//SUT code
});
}