我正在尝试在单元测试中执行以下操作:
IUnityContainer container = new UnityContainer();
DependencyResolver.SetResolver(new UnityDependencyResolver(container));
var test = DependencyResolver.Current.GetService<IUnityContainer>();
我收到以下错误,不确定发生了什么:
'System.NullReferenceException'发生在Unity.Mvc5.dll中,但没有 用户代码处理