Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 08, 2011 09:33 AM by dave555
0 Points
2 Posts
Aug 08, 2011 09:33 AM|LINK
Hi,
I have recently been following an online example for adding 404 pages to an MVC 3 application, some of you may be familiar with it:
http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/2577095#2577095.
I have managed to intergrate it into my application and the 404 screens are displayed if I add an invalid id into the web browser address etc.
Anyway, I am just learning about TDD (test driven development) and wondered how you might test a 404 handler like this.
I tried just testing the view returned by a 404 error but a System.NotImplementedException was thrown.
Is there a way to fake a web browser running for testing this? Or any tips/advice from anyone would be greatly appreciated.
Thanks,
Dave
404
dave555
0 Points
2 Posts
TDD how to test a 404 handler?
Aug 08, 2011 09:33 AM|LINK
Hi,
I have recently been following an online example for adding 404 pages to an MVC 3 application, some of you may be familiar with it:
http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/2577095#2577095.
I have managed to intergrate it into my application and the 404 screens are displayed if I add an invalid id into the web browser address etc.
Anyway, I am just learning about TDD (test driven development) and wondered how you might test a 404 handler like this.
I tried just testing the view returned by a 404 error but a System.NotImplementedException was thrown.
Is there a way to fake a web browser running for testing this? Or any tips/advice from anyone would be greatly appreciated.
Thanks,
Dave
404