Last active
December 10, 2015 01:58
-
-
Save istepaniuk/4364199 to your computer and use it in GitHub Desktop.
Exception cheking using FluentAssertions
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 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