From: chris c. <drc...@ya...> - 2003-12-03 13:30:10
|
Hi Nat, I'm surprised that you found ordered Mocks brittle and unhelpful. In our code base we have 16 uses of OrderedMocks compared to 330 Mocks. This is a small percentage but I'd be loathe to give them up. We use OrderedMocks in "transactional type" code, that is in our transaction manager, and in our streaming code. We have n't found the tests were brittle and we (rewrote the error messages to be helpful )but looking at the code now this is plainly because the order that each of the methods is called always matters in these cases. I think you are right to go down the route of the API since if we still want to keep our OrderedMocks we will probably just hide the use of the API inside our own OrderedMock class, allowing us the best of both worlds. Cheers, Chris |