Changed SystemDirectories from static to instance, Added interface in abstractions and create a static property on current.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user