Ejemplo n.º 1
0
                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>();
                }
Ejemplo n.º 2
0
                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");
                }