Skip to content

Instantly share code, notes, and snippets.

@BartusZak
Last active March 11, 2018 19:28
Show Gist options
  • Save BartusZak/8611a2bfd09e41d80df11ab75788eb0b to your computer and use it in GitHub Desktop.
Save BartusZak/8611a2bfd09e41d80df11ab75788eb0b to your computer and use it in GitHub Desktop.
Action does not contain a definition for ShouldThrow.
using System;
using Xunit;
namespace CustomerValidator.Tests
{
public class CustomerValidatorTests
{
[Fact]
public void WhenCustomerIsNull_ThenArgumentNullExceptionIsThrown()
{
var validator = new CustomerTDD.CustomerValidator();
Action action = () => validator.Validate(null);
action.ShouldThrow<ArgumentNullException>();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment