From 1d4e80904e712caea38baa81e031eeee9c1ea0ab Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 16 Sep 2014 11:51:10 +1000 Subject: [PATCH] updated test proj --- .../Cache/CacheRefresherTests.cs | 21 +++++++++++++++++++ .../Cache/HttpRequestCacheProviderTests.cs | 17 --------------- src/Umbraco.Tests/Umbraco.Tests.csproj | 1 + 3 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 src/Umbraco.Tests/Cache/CacheRefresherTests.cs diff --git a/src/Umbraco.Tests/Cache/CacheRefresherTests.cs b/src/Umbraco.Tests/Cache/CacheRefresherTests.cs new file mode 100644 index 0000000000..2cc84457ae --- /dev/null +++ b/src/Umbraco.Tests/Cache/CacheRefresherTests.cs @@ -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)); + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs b/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs index d16af8433a..87a468ddd5 100644 --- a/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs +++ b/src/Umbraco.Tests/Cache/HttpRequestCacheProviderTests.cs @@ -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 { diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 64be93bb9a..6d1baa5648 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -167,6 +167,7 @@ +