MVC- Unit test - ViewEngines

Hey, I work with mvc. I need to write unit test for a function containing

var result = ViewEngines.Engines.FindPartialView(context, partialPath);    

and my test will fail on this side: "RouteData should contain an element named" controller "with a non-empty string value." How can I make a face object for this? THX

+3
source share
1 answer

add that for the controller

 var routeData = new RouteData();
 routeData.Values.Add("controller", "someName");
 routeData.Values.Add("action", "someAction");
+4
source

All Articles