Over at TheServerSide they had a nice writeup of an example of how to use NUnitASP to test the UI of some pages.
I am not sure how valuable this would be to invest my time in, espically as it seems that there is now way to test repeaters or gridviews (there is a datagridtester however).
I will have to look some more and see if ther eis a way to do this.
This is awesome!
Wikipedia has a whole list of programming anti-patterns, and James Carr lists some TDD anti-patterns.
Some of these are pretty funny:
Magic numbers: Including unexplained numbers in algorithms
Superboolean logic: unnecessary comparison or abstraction of boolean arithmetic
Boat anchor: Retaining a part of a system that no longer has any use
Roy Osherove blogs that he was mistaken when he suggesting using mocks for data access code. With the improved Rollback attributes that he helped create, along with people like Justin Burtch who created a similar attribute for VSTS, they are now thinking that this is the way to go: rolling back database changes.
Roy is no fan of VSTS testing, finding a few bugs and some questionable design decisions. Those don’t seem like deal breakers for me, but we will see.
Rhino Mocks seems to be one of the most preferred mock frameworks out there.
Phil Haack, CodeBetter and Markitup have article showing how to test events on interfaces (x2) and objects in Rhino Mocks respectively.
They even have some videos up showing some Rhino Mocks stuff.
Haack also has a nice example of using MVP and Rhino Mocks to test some asp.net pages.
Update: Phil Haack has updated his HttpContext Simulator with some new goodies.
Here is an article by Haacked showing how one can create a test friendly httpcontext.
I modified his example some and started using it in some tests; works very nice!
Here is another implementation based on Haack’s example that is supposed to also work with session.
I almost NEVER use session if I can avoid it, but still this could come in handy.
There is virtually no information on the internet about how to use these tests.
This is one of the vew pages that actually shows a working example.
This discussion group seems to be mostly dealing with standard unit tests, and winform unit testing.
I am already using Enterprise Service Transactions in an app that I wrote to automate the generation of invoices at Walsh.
This same technique is an option (I have probably blogged about it before, but this is a nice article) for rolling back DB changes.