Does anyone know how to unit test SiteMapNode? We’re building some custom navigation controls, which renders unordered html lists from Site Maps with custom attributes.
I’m trying to follow a test first approach but am finding that SiteMapNode has internal dependencies on HttpContext. To traverse the site map file it insists on using a virtual path to find the site map file.
I have build a site map, which I’d like to test against but I don’t want to create my unit testing environment in web project(!)
Any suggestions? Mocking? Overriding the relevant members?