AB3734 - Review fixes

This commit is contained in:
Bjarke Berg
2019-11-21 14:29:48 +01:00
parent 94791bcd11
commit 75f084002a
5 changed files with 9 additions and 7 deletions

View File

@@ -2,9 +2,10 @@
using System.IO;
using System.Text;
using System.Threading;
using Moq;
using NUnit.Framework;
using Umbraco.Core.IO;
using Umbraco.Web.Composing;
using Umbraco.Core.Logging;
namespace Umbraco.Tests.IO
@@ -14,7 +15,7 @@ namespace Umbraco.Tests.IO
public class PhysicalFileSystemTests : AbstractFileSystemTests
{
public PhysicalFileSystemTests()
: base(new PhysicalFileSystem(IOHelper.Default, Current.Logger, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "FileSysTests"),
: base(new PhysicalFileSystem(IOHelper.Default, Mock.Of<ILogger>(), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "FileSysTests"),
"/Media/"))
{ }

View File

@@ -53,14 +53,15 @@ namespace Umbraco.Tests.IO
public void ShadowDeleteDirectory()
{
var ioHelper = IOHelper.Default;
var logger = Mock.Of<ILogger>();
var path = ioHelper.MapPath("FileSysTests");
Directory.CreateDirectory(path);
Directory.CreateDirectory(path + "/ShadowTests");
Directory.CreateDirectory(path + "/ShadowSystem");
var fs = new PhysicalFileSystem(ioHelper, Current.Logger, path + "/ShadowTests/", "ignore");
var sfs = new PhysicalFileSystem(ioHelper, Current.Logger, path + "/ShadowSystem/", "ignore");
var fs = new PhysicalFileSystem(ioHelper, logger, path + "/ShadowTests/", "ignore");
var sfs = new PhysicalFileSystem(ioHelper, logger, path + "/ShadowSystem/", "ignore");
var ss = new ShadowFileSystem(fs, sfs);
Directory.CreateDirectory(path + "/ShadowTests/d1");

View File

@@ -22,7 +22,7 @@ namespace Umbraco.Tests.Persistence.Repositories
{
base.SetUp();
_fileSystem = new PhysicalFileSystem(Current.IOHelper, Current.Logger, Constants.SystemDirectories.MvcViews + "/Partials/");
_fileSystem = new PhysicalFileSystem(IOHelper, Logger, Constants.SystemDirectories.MvcViews + "/Partials/");
}
protected override void Compose()

View File

@@ -53,7 +53,7 @@ namespace Umbraco.Tests.Scoping
[TestCase(false)]
public void CreateMediaTest(bool complete)
{
var physMediaFileSystem = new PhysicalFileSystem(IOHelper, Current.Logger, IOHelper.MapPath("media"), "ignore");
var physMediaFileSystem = new PhysicalFileSystem(IOHelper, Logger, IOHelper.MapPath("media"), "ignore");
var mediaFileSystem = Current.MediaFileSystem;
Assert.IsFalse(physMediaFileSystem.FileExists("f1.txt"));

View File

@@ -17,7 +17,7 @@ namespace Umbraco.Web.Editors
public BackOfficeAssetsController(IIOHelper ioHelper, ILogger logger, IGlobalSettings globalSettings)
{
_jsLibFileSystem = new PhysicalFileSystem(ioHelper, logger, globalSettings.UmbracoPath + Current.IOHelper.DirSepChar + "lib");
_jsLibFileSystem = new PhysicalFileSystem(ioHelper, logger, globalSettings.UmbracoPath + ioHelper.DirSepChar + "lib");
}
[HttpGet]