public SchemaResolverTests() { actionContext = new ActionContext(httpContext, new RouteData(), new ActionDescriptor { EndpointMetadata = new List <object>() }); actionExecutingContext = new ActionExecutingContext(actionContext, new List <IFilterMetadata>(), new Dictionary <string, object>(), this); actionExecutingContext.HttpContext = httpContext; actionExecutingContext.HttpContext.User = new ClaimsPrincipal(user); next = () => { isNextCalled = true; return(Task.FromResult <ActionExecutedContext?>(null)); }; sut = new SchemaResolver(appProvider); }