public void Should_be_valid_when_value_is_lower_using_instance_property() { var validator = new LowerThanValidator<Person, int>(p => p.Age); var person = new Person { Age = 18 }; Assert.That(validator.Validate(person, 16), Is.True); }
public void Should_be_invalid_when_value_is_greater_using_instance_property() { var validator = new LowerThanValidator <Person, int>(p => p.Age); var person = new Person { Age = 18 }; Assert.That(validator.Validate(person, 21), Is.False); }
public void Should_be_valid_when_value_is_lower() { var validator = new LowerThanValidator<Person, int>(18); Assert.That(validator.Validate(null, 16), Is.True); }
public void Should_be_invalid_when_value_is_greater() { var validator = new LowerThanValidator<Person, int>(18); Assert.That(validator.Validate(null, 21), Is.False); }
public void Should_be_invalid_when_value_is_greater() { var validator = new LowerThanValidator <Person, int>(18); Assert.That(validator.Validate(null, 21), Is.False); }
public void Should_be_valid_when_value_is_lower() { var validator = new LowerThanValidator <Person, int>(18); Assert.That(validator.Validate(null, 16), Is.True); }