Archives
-
Unit testing ASP.NET Web API controllers that rely on the UrlHelper
UrlHelper is the class you can use in ASP.NET Web API to automatically infer links from the routing table without hardcoding anything. For example, the following code uses the helper to infer the location url for a new resource,