public void With_valid_customer_does_not_throw() { // Arrange var sut = new CustomerProvider(); // Act Action action = () => sut.CreateCustomer(new Customer()); // Assert action.Should().NotThrow <Exception>(); }
public void With_missing_customer_throws() { // Arrange var sut = new CustomerProvider(); // Act Action action = () => sut.CreateCustomer(null); // Assert action.Should() .Throw <Exception>() .WithMessage("Customer is empty"); }