AB3734 - Review fixes
This commit is contained in:
@@ -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/"))
|
||||
{ }
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user