Imho very bad design descision to add that internal construction paramater here ... ServiceProviderExtensions.GetInstance<IContentTypeRepository>(ServiceLocator.Current)
Yes I can mock the serviceprovider ... but I thought you (Optimizely) would get rid of all those bad anti pattern stuff and only use proper injection. (hands up for those of you who loves doing unit tests for Episerver Commerce ... <being sarcastic>)
protected UIDescriptor(Type forType, string iconClass, IEnumerable<string> dndTypes)
: this(forType, iconClass, dndTypes, ServiceProviderExtensions.GetAllInstances<ViewConfiguration>(ServiceLocator.Current), LocalizationService.Current, ServiceProviderExtensions.GetInstance<IContentTypeRepository>(ServiceLocator.Current))
{
}
Imho very bad design descision to add that internal construction paramater here ...
ServiceProviderExtensions.GetInstance<IContentTypeRepository>(ServiceLocator.Current)
Yes I can mock the serviceprovider ... but I thought you (Optimizely) would get rid of all those bad anti pattern stuff and only use proper injection. (hands up for those of you who loves doing unit tests for Episerver Commerce ... <being sarcastic>)