A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Really? You broke our UIDescriptor unit tests with latest update 12.3.0

Vote:
 

    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>)

#271541
Feb 11, 2022 13:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.