Does anyone know how to unit test SiteMapNode? Some custom navigation controls have been created that display unordered html lists from Site Maps with custom attributes.
I am trying to take the first approach to testing, but I find that SiteMapNode has internal dependencies on the HttpContext. To move the sitemap file, he insists on using a virtual path to search for the sitemap file.
I have a site map that Id is trying to test, but I do not want to create my own modular test environment in a web project (!)
Any suggestions? Tantalizing? Redefinition of relevant members?
, , ! , , :
, - XML-. NavigationNodeFactory, NavigationNode xml.
NavigationNode , , , SiteMap SiteMapProvider, .
, , - SiteMapNode.
node , , sitemapnode, ISiteMapProvider , .
SiteMapNodeProvider , SiteMapNode , StubbedSiteMapProvider , .