From: chris c. <drc...@ya...> - 2003-06-30 08:03:33
|
On Sat, 28 Jun 2003 20:19:36 +0100, Nat Pryce <nat...@b1...> wrote: > From: "Steve Freeman" <st...@m3...> >> As per solutions, you might want to look at the branch for Nat's latest >> version. Some of the names have changed. > > I think the proposed solution is very neat, and could probably also be > used > to move the checks for and processing of "magic" calls from the Mock > class > into Callable objects. > > However, how would it work with the OrderedMock class? > > Cheers, > Nat. > > > I raised the question because I wondered what people thought about changing the contract of a proxy: that it would always respond to toString unless you explicitly told it not to. It had crossed my mind that this might cause trouble with OrderedMock but I think that handling the call to toString by adding a match in the constructor is an implementation detail really, very nice if it can be made to work but if we have to do something clunky then so be it. I'd want to think about what matching in an OrderedMock should mean though: should you have to match in the correct order? My instinct is no, matching should be allowed in any order.Any thoughts on that? Anyway given this broadly positive response (-no-one has said it's a *very* stupid idea yet) I shall knock something up on the train to work, in particular tests of Mock and OrderedMock. Cheers, Chris |