Fixes tests, simplifies constructors

This commit is contained in:
Shannon
2019-02-01 15:44:32 +11:00
parent 036ca7f1e5
commit ad5b166f3f
7 changed files with 34 additions and 24 deletions

View File

@@ -231,20 +231,6 @@ namespace Umbraco.Tests.Testing
.Append<TranslationBackOfficeSection>();
Composition.RegisterUnique<ISectionService, SectionService>();
//TODO: A lot of this is just copied from the WebRuntimeComposer, maybe we should just compose it all?
Composition.Register<IPublishedContentQuery>(factory =>
{
var umbCtx = factory.GetInstance<IUmbracoContextAccessor>();
return new PublishedContentQuery(umbCtx.UmbracoContext.ContentCache, umbCtx.UmbracoContext.MediaCache, factory.GetInstance<IVariationContextAccessor>());
}, Lifetime.Request);
Composition.Register<ITagQuery, TagQuery>(Lifetime.Request);
Composition.RegisterUnique<ITemplateRenderer, TemplateRenderer>();
Composition.RegisterUnique<IMacroRenderer, MacroRenderer>();
Composition.RegisterUnique<IUmbracoComponentRenderer, UmbracoComponentRenderer>();
// register the umbraco helper - this is Transient! very important!
Composition.Register<UmbracoHelper>();
}
protected virtual void ComposeWtf()