Created
July 9, 2015 16:19
-
-
Save bitbonk/9b0d0b76e661f0f5e43c 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