updated test proj
This commit is contained in:
21
src/Umbraco.Tests/Cache/CacheRefresherTests.cs
Normal file
21
src/Umbraco.Tests/Cache/CacheRefresherTests.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using NUnit.Framework;
|
||||
using umbraco.presentation.webservices;
|
||||
|
||||
namespace Umbraco.Tests.Cache
|
||||
{
|
||||
[TestFixture]
|
||||
public class CacheRefresherTests
|
||||
{
|
||||
[TestCase("", "123456", "testmachine", true)] //empty hash will continue
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a1819", "123456", "testmachine", false)] //match, don't continue
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a1819", "12345", "testmachine", true)]
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a1819", "123456", "testmachin", true)]
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a181", "123456", "testmachine", true)]
|
||||
public void Continue_Refreshing_For_Request(string hash, string appDomainAppId, string machineName, bool expected)
|
||||
{
|
||||
var refresher = new CacheRefresher();
|
||||
Assert.AreEqual(expected, refresher.ContinueRefreshingForRequest(hash, appDomainAppId, machineName));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,9 @@
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.Cache;
|
||||
using umbraco.presentation.webservices;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
|
||||
namespace Umbraco.Tests.Cache
|
||||
{
|
||||
[TestFixture]
|
||||
public class CacheRefresherTests
|
||||
{
|
||||
[TestCase("", "123456", "testmachine", true)] //empty hash will continue
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a1819", "123456", "testmachine", false)] //match, don't continue
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a1819", "12345", "testmachine", true)]
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a1819", "123456", "testmachin", true)]
|
||||
[TestCase("2c8aabac795d189d444a9cdc6e2a181", "123456", "testmachine", true)]
|
||||
public void Continue_Refreshing_For_Request(string hash, string appDomainAppId, string machineName, bool expected)
|
||||
{
|
||||
var refresher = new CacheRefresher();
|
||||
Assert.AreEqual(expected, refresher.ContinueRefreshingForRequest(hash, appDomainAppId, machineName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
public class HttpRequestCacheProviderTests : CacheProviderTests
|
||||
{
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
<Compile Include="AngularIntegration\JsInitializationTests.cs" />
|
||||
<Compile Include="AngularIntegration\ServerVariablesParserTests.cs" />
|
||||
<Compile Include="AttemptTests.cs" />
|
||||
<Compile Include="Cache\CacheRefresherTests.cs" />
|
||||
<Compile Include="Membership\DynamicMemberContentTests.cs" />
|
||||
<Compile Include="Membership\MembershipProviderBaseTests.cs" />
|
||||
<Compile Include="Membership\UmbracoServiceMembershipProviderTests.cs" />
|
||||
|
||||
Reference in New Issue
Block a user