None of the methods are virtual making it hard to mock and hence test. It would be great if these could be made virtual:
public string Link(string routeName, IDictionary<string, object> routeValues);
public string Link(string routeName, object routeValues);
public string Route(string routeName, IDictionary<string, object> routeValues);
public string Route(string routeName, object routeValues);
Thanks
Henrik
Comments: This is already fixed. See the spec at https://aspnetwebstack.codeplex.com/wikipage?title=Improving%20ApiController%20testability&referringTitle=Specs and the commit that fixed it at https://aspnetwebstack.codeplex.com/SourceControl/changeset/522ca1b4013566990732bc1cb96f5ac469c24596
public string Link(string routeName, IDictionary<string, object> routeValues);
public string Link(string routeName, object routeValues);
public string Route(string routeName, IDictionary<string, object> routeValues);
public string Route(string routeName, object routeValues);
Thanks
Henrik
Comments: This is already fixed. See the spec at https://aspnetwebstack.codeplex.com/wikipage?title=Improving%20ApiController%20testability&referringTitle=Specs and the commit that fixed it at https://aspnetwebstack.codeplex.com/SourceControl/changeset/522ca1b4013566990732bc1cb96f5ac469c24596