public void registers_link_correctly_with_web_api() { // arrange var templateLink = new Link("beerSearch", "/beers/{name}?searchTerm={searchTerm}&page={page=1}"); var httpRouteCollection = new HttpRouteCollection(); // act templateLink.RegisterLinkWithWebApi<BeersController>(httpRouteCollection); // assert Assert.NotEmpty(httpRouteCollection); Assert.Equal("beers/{name}", httpRouteCollection.Single().RouteTemplate); Assert.Equal("1", httpRouteCollection.Single().Defaults["page"]); Assert.Equal("Beers", httpRouteCollection.Single().Defaults["controller"]); }