Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2018 12:31
What would you like to do?
Additional services mocks
servicesMock.Setup(sp => sp.GetService(typeof(IUrlHelperFactory))).Returns(new UrlHelperFactory());
servicesMock.Setup(sp => sp.GetService(typeof(ITempDataDictionaryFactory))).Returns(new TempDataDictionaryFactory(new SessionStateTempDataProvider()));
context.HttpContext.RequestServices = servicesMock.Object;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment