Fix tests
This commit is contained in:
@@ -30,7 +30,8 @@ namespace Umbraco.Core.IO
|
||||
{
|
||||
// due to how FileSystems is written at the moment, the ctor cannot be used to inject
|
||||
// dependencies, so we have to rely on property injection for anything we might need
|
||||
Current.Container.InjectProperties(this);
|
||||
Current.Container.InjectProperties(this);
|
||||
MediaPathScheme.Initialize(this);
|
||||
|
||||
UploadAutoFillProperties = new UploadAutoFillProperties(this, Logger, ContentConfig);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.IO.MediaPathSchemes;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
@@ -32,6 +33,7 @@ namespace Umbraco.Tests.IO
|
||||
_container.Register<FileSystems>();
|
||||
_container.Register(_ => Mock.Of<IDataTypeService>());
|
||||
_container.Register(_ => Mock.Of<IContentSection>());
|
||||
_container.RegisterSingleton<IMediaPathScheme, OriginalMediaPathScheme>();
|
||||
|
||||
// make sure we start clean
|
||||
// because some tests will create corrupt or weird filesystems
|
||||
|
||||
@@ -9,6 +9,7 @@ using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.IO.MediaPathSchemes;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
@@ -72,6 +73,7 @@ namespace Umbraco.Tests.PropertyEditors
|
||||
|
||||
container.Register<ILogger, PerContainerLifetime>(f => Mock.Of<ILogger>());
|
||||
container.Register<IContentSection, PerContainerLifetime>(f => Mock.Of<IContentSection>());
|
||||
container.RegisterSingleton<IMediaPathScheme, OriginalMediaPathScheme>();
|
||||
var mediaFileSystem = new MediaFileSystem(Mock.Of<IFileSystem>());
|
||||
|
||||
var dataTypeService = new TestObjects.TestDataTypeService(
|
||||
|
||||
@@ -15,6 +15,7 @@ using Umbraco.Core.Composing.CompositionRoots;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Events;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.IO.MediaPathSchemes;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Manifest;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
@@ -188,6 +189,8 @@ namespace Umbraco.Tests.Testing
|
||||
|
||||
Container.RegisterCollectionBuilder<PropertyValueConverterCollectionBuilder>();
|
||||
Container.RegisterSingleton<IPublishedContentTypeFactory, PublishedContentTypeFactory>();
|
||||
|
||||
Container.RegisterSingleton<IMediaPathScheme, OriginalMediaPathScheme>();
|
||||
}
|
||||
|
||||
protected virtual void ComposeCacheHelper()
|
||||
|
||||
Reference in New Issue
Block a user