From: Steve F. <st...@m3...> - 2003-12-17 16:46:01
|
J. Xue wrote: > Yeah, it seems that an adapter is the most viable way so far. I did have some > other thoughts while we were exchanging these messages, though. Is it possible > to relax the expectation semantics so that expectations wouldn't have to be set > *before* the "actuals" happen. Wouldn't it be more flexible if expectations > can be set at any time before verification, while actual cases are only > recorded as they happen? Then only at verification time they would be compared > against each other. Of course you can do that, but that's a different technique. How much this matters depends on your task, what you should be avoiding is the sort of test that fails at the end but you can't quite see where, so you have to step it through in the debugger. An advantage of MO tests is that they fail when the error occurs. There are also interesting questions about how the test drives the code. MO tend to push you towards defining types that talk about the relationshps between objects, state tests push you towards exposing state in your objects. Your call... S. -- "A LISP programmer knows the value of everything but the cost of nothing. A C programmer knows the cost of everything but the value of nothing." (Todd Proebsting) |