I don't usually mock the actual models. If I'm using a LoadableDetachableModel, I'll mock the DAO or "repository" that the model is using to find its data, but I never actually mock the model itself.
On Fri, May 2, 2008 at 5:30 AM, Per Newgro <[EMAIL PROTECTED]> wrote: > Hi *, > > i try to test a page with some panels. They all get their models thru the > constructor. The assigned models are always implementing IModel. At the > highest level (page) there is a CompoundPropertyModel and all sub-components > use a chain of PropertyModels. So far so good. > > Now i try to use "easymock - interface api" to unit test the page. I assign > the mock proxy (IMpdel) to the page and the sub-components should get their > part of the model. The problem is that i can't find a way to give the > sub-component an appropriate new IModel mock proxy, because on the original > IModel only getObject() will be called. I don't have the abillity to > distinguish by property expression. > > Another way would be to use the class extension of easymock. But i would like > to avoid it. Maybe someone solved this issue somehow with only usage of the > easymock - interface api. > > I hope i made my points clear. > > Thanks > Per > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
