I have a cshtml file with a call to
passing as a second parameter the name of the route.
I'm having an exception in my test because the route name cannot be found in the route collection. I'm trying to set the route collection in the view using:
var mockViewContext = new Mock<ViewContext>();
var mockViewDataContainer = new Mock<IViewDataContainer>();
mockViewDataContainer.Setup(vdc => vdc.ViewData).Returns(new ViewDataDictionary());
var routeCollection = new RouteCollection();
var details = new Details();
details.Html = new HtmlHelper<VacancyDetailViewModel>(mockViewContext.Object, mockViewDataContainer.Object, routeCollection);
But it doesn't works.
How can I deal with this problem?
Thank you very much,