From: J. X. <sou...@ma...> - 2003-12-17 16:37:35
|
Quoting Nat Pryce <nat...@b1...>: > ClassUnderTest would call an interface to perform unmarshalling. It > wouldn't care if the implementation of the interface was an adapter or a > direct implementation. Whichever approach you take (adapter or mocking > castor), you'd put the mock unmarshaller into your own test package. > There's no need to touch the castor packages. 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. --J.X. |