shekharpro / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Extends Assert.Throws to check for the inner exception in the same time. #434

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Jeff said:
BTW, wondering whether you felt it would be worthwhile adding overloads 
that could handle two exceptions at once, specifically for validating both 
outer/inner exception type at the same type. 

var outerException = Assert.Throws<OuterException, InnerException>(() 
=> ... 
); 

instead of: 

var outerException = Assert.Throws<OuterException>(() => ... ); 
Assert.IsInstanceOftype<InnerException>(ex.InnerException); 

Original issue reported on code.google.com by Yann.Tre...@gmail.com on 28 Apr 2009 at 11:33

GoogleCodeExporter commented 8 years ago

Original comment by Yann.Tre...@gmail.com on 30 Apr 2009 at 5:40