private ReflectedActionDescriptorProvider GetActionDescriptorProvider( IActionDiscoveryConventions actionDiscoveryConventions = null) { var controllerAssemblyProvider = new StaticControllerAssemblyProvider(); if (actionDiscoveryConventions == null) { var controllerTypes = typeof(ActionAttributeTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(t => t.GetTypeInfo()); actionDiscoveryConventions = new StaticActionDiscoveryConventions(controllerTypes.ToArray()); } return(new ReflectedActionDescriptorProvider( controllerAssemblyProvider, actionDiscoveryConventions, null, new MockMvcOptionsAccessor(), Mock.Of <IInlineConstraintResolver>())); }
private ReflectedActionDescriptorProvider GetActionDescriptorProvider( IActionDiscoveryConventions actionDiscoveryConventions = null) { var controllerAssemblyProvider = new StaticControllerAssemblyProvider(); if (actionDiscoveryConventions == null) { var controllerTypes = typeof(ActionAttributeTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(t => t.GetTypeInfo()); actionDiscoveryConventions = new StaticActionDiscoveryConventions(controllerTypes.ToArray()); } return new ReflectedActionDescriptorProvider( controllerAssemblyProvider, actionDiscoveryConventions, null, new MockMvcOptionsAccessor(), Mock.Of<IInlineConstraintResolver>()); }