public void LogicalDate_ShouldConvertToLogicalDate() { string expectedLogical = "2950425"; DateTime expectedDateTime = new DateTime(1995, 4, 25); string actual = InternalCacheUtilities.DateTimeToLogicalDate(expectedDateTime); Assert.AreEqual(expectedLogical, actual); }
/// <summary> /// Gets the value from the supplied entity /// </summary> /// <param name="entity"></param> /// <returns></returns> public override object GetValue(object entity) { object value = base.GetValue(entity); if (value is DateTime time) { return(InternalCacheUtilities.DateTimeToLogicalDate(time)); } return(value); }