public void If_upper_bound_is_set_require_value_less_than_or_equal_to_bound() { var r = new ValueRangeRequirement<int>(); r.Upper = 10; Assert.NotEmpty(r.Check(11)); Assert.Empty(r.Check(10)); Assert.Empty(r.Check(9)); }
public void If_no_bounds_are_set_return_null() { var r = new ValueRangeRequirement<int>(); r.LowerExclusive = true; r.UpperExclusive = true; Assert.Empty(r.Check(-100)); Assert.Empty(r.Check(100)); Assert.Empty(r.Check(1)); }
public void If_lower_bound_is_set_require_value_higher_than_bound() { var r = new ValueRangeRequirement<int>(); r.Lower = 10; r.LowerExclusive = true; Assert.Empty(r.Check(11)); Assert.NotEmpty(r.Check(10)); Assert.NotEmpty(r.Check(9)); }
public void If_no_bounds_are_set_return_null() { var r = new ValueRangeRequirement <int>(); Assert.Empty(r.Check(-100)); Assert.Empty(r.Check(100)); Assert.Empty(r.Check(1)); }
public void If_upper_bound_is_set_require_value_less_than_or_equal_to_bound() { var r = new ValueRangeRequirement <int>(); r.Upper = 10; Assert.NotEmpty(r.Check(11)); Assert.Empty(r.Check(10)); Assert.Empty(r.Check(9)); }
public void If_no_bounds_are_set_return_null() { var r = new ValueRangeRequirement <int>(); r.LowerExclusive = true; r.UpperExclusive = true; Assert.Empty(r.Check(-100)); Assert.Empty(r.Check(100)); Assert.Empty(r.Check(1)); }
public void If_lower_bound_is_set_require_value_higher_than_bound() { var r = new ValueRangeRequirement <int>(); r.Lower = 10; r.LowerExclusive = true; Assert.Empty(r.Check(11)); Assert.NotEmpty(r.Check(10)); Assert.NotEmpty(r.Check(9)); }
public void If_no_bounds_are_set_return_null() { var r = new ValueRangeRequirement<int>(); Assert.Empty(r.Check(-100)); Assert.Empty(r.Check(100)); Assert.Empty(r.Check(1)); }