Renames and refactors the MediaUrlGeneratorCollection and ensure that this collection is used wherever IMediaUrlGenerator is needed instead of relying property editors possibly being the implementation.
This commit is contained in:
@@ -36,8 +36,9 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var entityRepository = new EntityRepository(accessor);
|
||||
var relationRepository = new RelationRepository(accessor, Logger, relationTypeRepository, entityRepository);
|
||||
var propertyEditors = new Lazy<PropertyEditorCollection>(() => new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty<IDataEditor>())));
|
||||
var mediaUrlGenerators = new MediaUrlGeneratorCollection(Enumerable.Empty<IMediaUrlGenerator>());
|
||||
var dataValueReferences = new DataValueReferenceFactoryCollection(Enumerable.Empty<IDataValueReferenceFactory>());
|
||||
var repository = new MediaRepository(accessor, AppCaches, Mock.Of<ILogger>(), mediaTypeRepository, tagRepository, Mock.Of<ILanguageRepository>(), relationRepository, relationTypeRepository, propertyEditors, dataValueReferences, DataTypeService);
|
||||
var repository = new MediaRepository(accessor, AppCaches, Mock.Of<ILogger>(), mediaTypeRepository, tagRepository, Mock.Of<ILanguageRepository>(), relationRepository, relationTypeRepository, propertyEditors, mediaUrlGenerators, dataValueReferences, DataTypeService);
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user