Created
December 19, 2011 22:25
-
-
Save skalinets/1499201 to your computer and use it in GitHub Desktop.
FluentAssertions and exceptions
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
[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