Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB3734-move-io-stuff

# Conflicts:
#	src/Umbraco.Abstractions/IO/FileSystems.cs
#	src/Umbraco.Abstractions/IO/PhysicalFileSystem.cs
#	src/Umbraco.Abstractions/IO/ShadowWrapper.cs
#	src/Umbraco.Core/Composing/CompositionExtensions/FileSystems.cs
#	src/Umbraco.Tests/IO/PhysicalFileSystemTests.cs
#	src/Umbraco.Tests/IO/ShadowFileSystemTests.cs
#	src/Umbraco.Tests/Persistence/Repositories/PartialViewRepositoryTests.cs
#	src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs
#	src/Umbraco.Tests/Persistence/Repositories/StylesheetRepositoryTest.cs
#	src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs
#	src/Umbraco.Tests/Scoping/ScopeFileSystemsTests.cs
#	src/Umbraco.Web/Editors/BackOfficeAssetsController.cs
#	src/Umbraco.Web/Trees/FilesTreeController.cs
This commit is contained in:
Bjarke Berg
2019-11-20 12:14:42 +01:00
157 changed files with 738 additions and 550 deletions

View File

@@ -21,7 +21,7 @@ namespace Umbraco.Tests.Scoping
base.SetUp();
SafeCallContext.Clear();
ClearFiles();
ClearFiles(IOHelper);
}
protected override void ComposeApplication(bool withApplication)
@@ -39,21 +39,21 @@ namespace Umbraco.Tests.Scoping
base.TearDown();
SafeCallContext.Clear();
FileSystems.ResetShadowId();
ClearFiles();
ClearFiles(IOHelper);
}
private static void ClearFiles()
private static void ClearFiles(IIOHelper ioHelper)
{
TestHelper.DeleteDirectory(Current.IOHelper.MapPath("media"));
TestHelper.DeleteDirectory(Current.IOHelper.MapPath("FileSysTests"));
TestHelper.DeleteDirectory(Current.IOHelper.MapPath(Constants.SystemDirectories.TempData.EnsureEndsWith('/') + "ShadowFs"));
TestHelper.DeleteDirectory(ioHelper.MapPath("media"));
TestHelper.DeleteDirectory(ioHelper.MapPath("FileSysTests"));
TestHelper.DeleteDirectory(ioHelper.MapPath(Constants.SystemDirectories.TempData.EnsureEndsWith('/') + "ShadowFs"));
}
[TestCase(true)]
[TestCase(false)]
public void CreateMediaTest(bool complete)
{
var physMediaFileSystem = new PhysicalFileSystem(Current.IOHelper, Current.Logger, Current.IOHelper.MapPath("media"), "ignore");
var physMediaFileSystem = new PhysicalFileSystem(IOHelper, Current.Logger, IOHelper.MapPath("media"), "ignore");
var mediaFileSystem = Current.MediaFileSystem;
Assert.IsFalse(physMediaFileSystem.FileExists("f1.txt"));
@@ -86,7 +86,7 @@ namespace Umbraco.Tests.Scoping
[Test]
public void MultiThread()
{
var physMediaFileSystem = new PhysicalFileSystem(Current.IOHelper, Current.Logger, Current.IOHelper.MapPath("media"), "ignore");
var physMediaFileSystem = new PhysicalFileSystem(IOHelper, Logger, IOHelper.MapPath("media"), "ignore");
var mediaFileSystem = Current.MediaFileSystem;
var scopeProvider = ScopeProvider;