public void IsValid_With_Correct_String() { object stringObj = "test"; var strattr = new CustomMinStringLengthAttribute(3); Assert.IsTrue(strattr.IsValid(stringObj)); }
public void IsValid_With_Incorrect_String() { object stringObj = "no"; var strattr = new CustomMinStringLengthAttribute(3); Assert.IsFalse(strattr.IsValid(stringObj)); }
public void IsValid_With_Null_String() { object nullObj = null; var strattr = new CustomMinStringLengthAttribute(3); Assert.IsTrue(strattr.IsValid(nullObj)); }