My team is writing a content-managed web-hosting application in ASP.Net MVC 2 with the S#arp Architecture framework. I'm using SpecFlow and WatiN for integration testing, and NUnit for unit testing.
I have a custom controller factory that locates a page in the database based on the URL and site, and then loads the proper controller and action. It also loads an error controller when the page (or site) is not found in the database.
I want to write either a unit test or integration test that validates a 404 page is properly displayed when the URL is invalid. WatiN cannot check the response header, so it cannot accurately ensure an actual 404 page was loaded. This may eliminate an integration test as the solution.
I'm new to TDD and BDD, so I may be missing something obvious. Also, I am retro-fitting tests into this project, which makes it that much more difficult.
Thanks in advance.