porting 7.6-rc1 into 8
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Web.Caching;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.Cache;
|
||||
|
||||
@@ -10,7 +9,7 @@ namespace Umbraco.Tests.Cache
|
||||
{
|
||||
|
||||
internal abstract IRuntimeCacheProvider RuntimeProvider { get; }
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void Can_Add_And_Expire_Struct_Strongly_Typed_With_Null()
|
||||
@@ -19,12 +18,11 @@ namespace Umbraco.Tests.Cache
|
||||
RuntimeProvider.InsertCacheItem("DateTimeTest", () => now, new TimeSpan(0, 0, 0, 0, 200));
|
||||
Assert.AreEqual(now, Provider.GetCacheItem<DateTime>("DateTimeTest"));
|
||||
Assert.AreEqual(now, Provider.GetCacheItem<DateTime?>("DateTimeTest"));
|
||||
|
||||
|
||||
Thread.Sleep(300); //sleep longer than the cache expiration
|
||||
|
||||
Assert.AreEqual(default(DateTime), Provider.GetCacheItem<DateTime>("DateTimeTest"));
|
||||
Assert.AreEqual(null, Provider.GetCacheItem<DateTime?>("DateTimeTest"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user