You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Debug assertion in InjectableProcessor will cause tests to fail when you try to use a mock service instead of an injected service in the processor. Quick fix is to remove that line but Andrew said it would be nice to have that line in the real world.
namespace Gibe.DittoProcessors.Processors
{
public abstract class InjectableProcessorAttribute : TestableDittoProcessorAttribute
{
protected static Func<T> Inject<T>()
{
Debug.Assert(DependencyResolver.Current == null || DependencyResolver.Current.GetService<T>() != null);
return () => DependencyResolver.Current.GetService<T>();
}
protected IPublishedContent Content => Value as IPublishedContent ?? Context.Content;
}
}
The text was updated successfully, but these errors were encountered:
The Debug assertion in InjectableProcessor will cause tests to fail when you try to use a mock service instead of an injected service in the processor. Quick fix is to remove that line but Andrew said it would be nice to have that line in the real world.
The text was updated successfully, but these errors were encountered: