From: Steve F. <st...@m3...> - 2002-11-25 00:15:44
|
Barry Kaplan wrote: > One of the big problem we ran into with mockobjects was the ability to > get back the values passed into mocks (vs. just having the mock assert > the values). For example, when testing a class that registers as a > listener [with some mock], we often want to get hold of that listener > instance (which may be the CUT or an inner of class of the CUT) and > invoke methods on the listener so as to test the listening behavior. > Implementations of Expectation all maintain the expected values as > private and provide no accessors, making this type of usage impossible. We probably should open up the instance variables, but we tend to use those forces to push the way we code. I don't really understand your example, could you post a snippet? > Back then I never really dug into the mockobjects code. Now, after > having done so, I see that the mockobjects implementation is clean and > simple, and most of limitations [for us] can easiliy be removed. We used > easymock for a while, but had same issues as with mockobjects. If you have time, could you describe them? > Thanks for the help Steve. my pleasure. > (I notice that all your responses post to both user and dev. Should that > be the normal practice?) not sure who's interested in this, so I'm resorting to a scattergun. Anyone prefer me not to? S. |