Example #1
0
        public void WhenCustomerHasAgeGreaterThanOrEqualTo18_ThenValidationPasses([Values(18, 19)] int expectedAge)
        {
            var validator = new CustomerValidator();
            var customer  = new CustomerMock(expectedAge: expectedAge);

            bool validate = validator.Validate(customer);

            validate.Should().BeTrue();
        }
Example #2
0
        public void WhenCustomerHasAgeLessThan18_ThenValidationFails()
        {
            var validator = new CustomerValidator();
            var customer  = new CustomerMock(expectedAge: 16);

            bool validate = validator.Validate(customer);

            validate.Should().BeFalse();
        }