Unit Testing UrlHelper Extension Methods

Posted by fregas on Stack Overflow See other posts from Stack Overflow or by fregas
Published on 2010-04-19T20:41:51Z Indexed on 2010/04/19 20:43 UTC
Read the original article Hit count: 571

I'm trying to create unit tests to make sure my extension methods for UrlHelper work? Does anyone know how to do this? I'm using MVC 1.0 and MvcContrib. I can test the routes but can't test code like this:

    public static string MoreFloorplans(this UrlHelper urlHelper, long productID, int pageIndex)
    {
     return urlHelper.Action<CatalogController>(x => x.GetRelatedProducts(productID, pageIndex));

    }

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about mvccontrib-testhelper