Unit Test SiteMapNode

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?

+3
source share
2 answers

, , ! , , :

, - XML-. NavigationNodeFactory, NavigationNode xml.

NavigationNode , , , SiteMap SiteMapProvider, .

+2

, , - SiteMapNode.

node , , sitemapnode, ISiteMapProvider , .

SiteMapNodeProvider , SiteMapNode , StubbedSiteMapProvider , .

0

All Articles