Created
July 9, 2015 16:13
-
-
Save bitbonk/9c465185c8fa186ab16c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void AssertNestedInnerException() | |
{ | |
var expectedExcpetion = new Exception(); | |
new Action( | |
() => | |
{ | |
throw new InvalidOperationException("", new KeyNotFoundException("", expectedExcpetion)); | |
}) | |
.ShouldThrow<InvalidOperationException>() | |
.WithInnerException<KeyNotFoundException>() | |
.Which.InnerException.InnerException.Should().Be(expectedExcpetion); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment