porting 7.6-rc1 into 8

This commit is contained in:
Stephan
2017-05-12 14:49:44 +02:00
parent ade6c2f057
commit 8561d85f7a
1148 changed files with 41983 additions and 17045 deletions

View File

@@ -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"));
}
}
}