Skip to content

Instantly share code, notes, and snippets.

@skalinets
Created December 19, 2011 22:25
Show Gist options
  • Save skalinets/1499201 to your computer and use it in GitHub Desktop.
Save skalinets/1499201 to your computer and use it in GitHub Desktop.
FluentAssertions and exceptions
[Fact]
public void should_throw_exception_for_negatives()
{
// act
Action c = () => calculator.Add("-1,2");
// assert
c.ShouldThrow<Exception>().WithMessage("negatives are not allowed");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment