News for hackers. Stuff that matters.
Re:The maintainability of unit tests by moss on Thursday February 25, 2010 @01:57PM (#1151283)
It sounds like your philosophy of testing is about what mine was a year ago. Since then, I think I've modified it in two big ways:

1) I've found that potential bugs, and design problems, are often easier to spot at a lower level. Because of this, I've started using more integration-y tests to build out my initial implementation, and more unit-y tests to fill out additional details.

2) I've found the GOOD use of mock objects: when I have a class that wants to expose its data by calling a method on a narrow, well-defined interface, rather than by providing it through a getter, I'm happy using a mock version of that interface.

I wouldn't advocate it as The One True Testing Dogma, but I thought I'd share it in case you find it useful.

Re:The maintainability of unit tests by noss on Thursday February 25, 2010 @03:25PM (#1151493)
This made me curious, could you expand on what you mean with 2?