Unit test – unit test SitemapNode

Does anyone know how to unit test SiteMapNode? We are building some custom navigation controls that use custom attributes to render an unordered html list from the site map.

I am trying to follow the first method of testing, but I found that SiteMapNode is right HttpContext has internal dependencies. To traverse the sitemap file, it insists on using a virtual path to find the sitemap file.

I have built a sitemap and I want to test it, but I don’t want to be in a web project Create my unit test environment(!)

Any suggestions? discipline? Cover relevant members?

A rather dull question, so it’s no surprise that it didn’t get a response! For others who may stumble upon this problem, this is my preferred solution:

I found that the best way to deal with this problem is to load the physical sitemap into an xml document. Then I There is a NavigationNodeFactory that validates and builds my own composite NavigationNode tree from xml documents.

My NavigationNode class is as conceited as I like, and bypasses the problems I found in SiteMap and SiteMapProvider, That is, the testability of implementers is poor.

Does anyone know how to unit test SiteMapNode? We are building some custom navigation controls that use custom attributes to render an unordered html list from the site map.

I am trying to follow the first method of testing, but I found that SiteMapNode is right HttpContext has internal dependencies. To traverse the sitemap file, it insists on using a virtual path to find the sitemap file.

I have built a sitemap and I want to test it, but I don’t want to be in a web project Create my unit test environment(!)

Any suggestions? discipline? Cover relevant members?

A rather dull question, so it’s no surprise that it didn’t get a response! For others who may stumble upon this problem, this is my preferred solution:

I found that the best way to deal with this problem is to load the physical sitemap into an xml document. Then I There is a NavigationNodeFactory that validates and builds my own composite NavigationNode tree from xml documents.

My NavigationNode class is as conceited as I like, and bypasses the problems I found in SiteMap and SiteMapProvider, That is, the testability of the implementer is poor.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2340 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.