public void WhenCustomerHasAgeLessThan18_ThenValidationFails() { var validator = new CustomerValidator(); var customer = new CustomerMock(16); bool validate = validator.Validate(customer); validate.Should().BeFalse(); }
public void WhenCustomerHasAgeGreaterThanOrEquealTo18_ThenValidationTrue( [Values(18, 19)] int expectedAge) { var validator = new CustomerValidator(); var customer = new CustomerMock(expectedAge: expectedAge); bool validate = validator.Validate(customer); validate.Should().BeTrue(); }