Skip to content

Instantly share code, notes, and snippets.

@istepaniuk
Last active December 10, 2015 01:58
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 istepaniuk/4364199 to your computer and use it in GitHub Desktop.
Save istepaniuk/4364199 to your computer and use it in GitHub Desktop.
Exception cheking using FluentAssertions
[TestMethod()]
public void ThrowsAnExceptionIfItIsNotAFruit()
{
var service = new FruitColorService();
Action action = () => service.GetColorOf(new Tomato());
action.ShouldThrow<InvalidFruitException>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment