2020-03-09 13:31:56 +11:00
|
|
|
|
using System.Linq;
|
2018-06-29 19:52:40 +02:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
using Umbraco.Core.Cache;
|
2020-03-09 13:31:56 +11:00
|
|
|
|
using Umbraco.Tests.TestHelpers;
|
2018-06-29 19:52:40 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Tests.Cache
|
|
|
|
|
|
{
|
|
|
|
|
|
[TestFixture]
|
2019-01-18 08:14:08 +01:00
|
|
|
|
public class ObjectAppCacheTests : RuntimeAppCacheTests
|
2018-06-29 19:52:40 +02:00
|
|
|
|
{
|
2019-01-17 11:01:23 +01:00
|
|
|
|
private ObjectCacheAppCache _provider;
|
2018-06-29 19:52:40 +02:00
|
|
|
|
|
|
|
|
|
|
protected override int GetTotalItemCount
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _provider.MemoryCache.Count(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Setup()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Setup();
|
2020-03-09 13:31:56 +11:00
|
|
|
|
var typeFinder = TestHelper.GetTypeFinder();
|
2019-11-11 16:07:47 +11:00
|
|
|
|
_provider = new ObjectCacheAppCache(typeFinder);
|
2018-06-29 19:52:40 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-01-18 08:14:08 +01:00
|
|
|
|
internal override IAppCache AppCache
|
2018-06-29 19:52:40 +02:00
|
|
|
|
{
|
|
|
|
|
|
get { return _provider; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-01-18 08:14:08 +01:00
|
|
|
|
internal override IAppPolicyCache AppPolicyCache
|
2018-06-29 19:52:40 +02:00
|
|
|
|
{
|
|
|
|
|
|
get { return _provider; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|