public void RubberStamp_Conditions_CustomPropertyCondition_String_Valid_Test() { var condition = new CustomPropertyCondition <TestClass, string>(c => c.Name, (c, p) => p != null); Assert.IsTrue(condition.IsValid(new TestClass { Name = "TEST" })); }
public void RubberStamp_Conditions_CustomPropertyCondition_Int_Invalid_Test() { var condition = new CustomPropertyCondition <TestClass, int>(c => c.Index, (c, p) => p > 0); Assert.IsFalse(condition.IsValid(new TestClass { Index = 0 })); }