From: Nat P. <nat...@b1...> - 2003-07-21 23:19:01
|
It'll hurt some of my projects, but I'm willing to defer a move over to a new API for some projects and try out a new API on others. I'd love to see a way to alleviate the overloading hassle. Tim's idea of creating "expected call" objects that you can add arguments and return values to seems a good way to go. However, I've found the decorator architecture incredibly flexible and I'm not sure if separating matching from expectations will be a good way to go. For example, I've recently been writing a structured graphics framework. One thing I need to test is the drawing order of layered graphics: elements should be drawn in their z-order. So I mock each layered element and expect draw calls. However, this does not test the order of calls: I need a call sequence that crosses multiple mocks. This is trivial to do with decorators because they have both a match and call method. It would be hard to do if the two methods are in separate objects. (I can provide more details if anybody is interested). Cheers, Nat. _______________________ Dr. Nathaniel Pryce B13media Ltd. http://www.b13media.com +44 (0)7712 526 661 ----- Original Message ----- From: "Steve Freeman" <st...@m3...> To: "Vincent Massol" <vm...@pi...> Cc: "'Moc...@Li...'" <moc...@li...> Sent: Tuesday, July 22, 2003 12:00 AM Subject: Re: [MO-java-dev] dynamic branch and merge > Folks (and especially Vincent). I've been trying to find a way to break > through the morass of overloading to come up with a cleaner API for the > dynamics and it's not easy to do it incrementally. Maybe I'm just too > tired, or need a pair, but the backwards compatibility is getting in the > way. > > I know Vincent's written it up in his book, but is there anyone else > that an API change would hurt? Or a way to do it under the covers? > > S. > > Vincent Massol wrote: > > Is this going to break the DynaMock API from released version 0.09? > > > > In any case I believe we should absolutely provide backward > > compatibility and mark changed methods as deprecated. All new public > > methods should also be tagged with the "@since" javadoc tag. > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev |