public void RDateTimeAttributeDisplayValueCorrect() { var result = new RDateTimeAttribute().Validate(() => new { Date = "Not a date" }, "Date", "Purchase date"); Assert.IsNotNull(result); Assert.IsTrue(result.ErrorMessage.Contains("Purchase date")); }
public void RDateTimeAttributeNegative() { var result = new RDateTimeAttribute().Validate(() => new { Date = "Not a date" }, "Date"); Assert.IsNotNull(result); }
public void RDateTimeAttributePositive() { var result = new RDateTimeAttribute().Validate(() => new { Date = DateTime.Now }, "Date"); Assert.IsNull(result); }