From d85cb9e15e41af2eea3014bd7e6daeffb5a9aa96 Mon Sep 17 00:00:00 2001 From: Stephan Date: Sat, 28 Jan 2017 10:04:43 +0100 Subject: [PATCH] Fix FileSystemProviderManagerTests --- .../IO/FileSystemProviderManagerTests.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Tests/IO/FileSystemProviderManagerTests.cs b/src/Umbraco.Tests/IO/FileSystemProviderManagerTests.cs index 56b487a82e..4088a7d470 100644 --- a/src/Umbraco.Tests/IO/FileSystemProviderManagerTests.cs +++ b/src/Umbraco.Tests/IO/FileSystemProviderManagerTests.cs @@ -1,10 +1,10 @@ using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; +using Moq; using NUnit.Framework; +using Umbraco.Core; using Umbraco.Core.IO; +using Umbraco.Core.Logging; +using Umbraco.Core.Profiling; using Umbraco.Tests.TestHelpers; namespace Umbraco.Tests.IO @@ -18,6 +18,9 @@ namespace Umbraco.Tests.IO //init the config singleton var config = SettingsForTests.GetDefault(); SettingsForTests.ConfigureSettings(config); + + // media fs wants this + ApplicationContext.Current = new ApplicationContext(CacheHelper.CreateDisabledCacheHelper(), new ProfilingLogger(Mock.Of(), Mock.Of())); } [Test] @@ -42,7 +45,6 @@ namespace Umbraco.Tests.IO Assert.Throws(() => FileSystemProviderManager.Current.GetFileSystemProvider()); } - /// /// Used in unit tests, for a typed file system we need to inherit from FileSystemWrapper and they MUST have a ctor /// that only accepts a base IFileSystem object