public void CompareStructs() { var d1 = new DateTime(1000, 1, 1); var d2 = new DateTime(1000, 1, 1); var d3 = new DateTime(1001, 1, 1); var sc = new CompareAttribute("FieldA"); Assert.IsFalse(sc.IsValid(d1, d3)); Assert.IsTrue(sc.IsValid(d1, d2)); }
public void CompareValidStrings() { var sc = new CompareAttribute("FieldA"); Assert.IsFalse(sc.IsValid("value", "Value")); Assert.IsTrue(sc.IsValid("value", "value")); }
public void CompareValueTypes() { var sc = new CompareAttribute("FieldA"); Assert.IsFalse(sc.IsValid(12, 44)); Assert.IsTrue(sc.IsValid(23, 23)); }
public void ItShouldBePossibleToSetTheWithField() { var sc = new CompareAttribute("FieldA"); Assert.AreEqual("FieldA", sc.WithField); }