Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayBazuzi/540936ec75b8b9585188 to your computer and use it in GitHub Desktop.
Save JayBazuzi/540936ec75b8b9585188 to your computer and use it in GitHub Desktop.
// before
testSubject.Invoking(ts => ts.F())
.ShouldThrow<Exception>()
.WithMessage("the foo was out of range (...)");
// after
testSubject.Invoking(ts => ts.F())
.ShouldThrow<FooOutOfRangeException>()
.And.Foo.Should().Be("...");
new FooOutOfRangeException("...").Message.Should().Be("the foo was out of range (...)");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment