public void IsValidFail(IComparable value, IComparable maxValue, bool expected) { var attribute = new CannotBeLessThanAttribute(maxValue); try { attribute.IsValid(value); Assert.Fail(); } catch (FormatException ex) { Assert.AreEqual("Input string was not in a correct format.", ex.Message); } }
public void IsValid(IComparable value, IComparable maxValue, bool expected) { var attribute = new CannotBeLessThanAttribute(maxValue); Assert.AreEqual(expected, attribute.IsValid(value)); }