Changed SystemDirectories from static to instance, Added interface in abstractions and create a static property on current.

This commit is contained in:
Bjarke Berg
2019-11-12 15:25:21 +01:00
parent 282220ee39
commit 0fcf8325e3
68 changed files with 249 additions and 191 deletions

View File

@@ -3,6 +3,7 @@ using System.Linq;
using System.Text;
using Moq;
using NUnit.Framework;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
@@ -26,7 +27,7 @@ namespace Umbraco.Tests.Persistence.Repositories
base.SetUp();
_fileSystems = Mock.Of<IFileSystems>();
_fileSystem = new PhysicalFileSystem(SystemDirectories.Scripts);
_fileSystem = new PhysicalFileSystem(Current.SystemDirectories.Scripts);
Mock.Get(_fileSystems).Setup(x => x.ScriptsFileSystem).Returns(_fileSystem);
using (var stream = CreateStream("Umbraco.Sys.registerNamespace(\"Umbraco.Utils\");"))
{
@@ -36,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories
private IScriptRepository CreateRepository()
{
return new ScriptRepository(_fileSystems, new IOHelper());
return new ScriptRepository(_fileSystems, IOHelper);
}
protected override void Compose()