From: Vincent M. <vm...@pi...> - 2003-05-13 07:26:19
|
> -----Original Message----- > From: Steve Freeman [mailto:st...@m3...] > Sent: 12 May 2003 23:25 > To: Vincent Massol > Cc: 'Mockobjects-Java-Dev' > Subject: Re: [MO-java-dev] First batch of questions on new Dynamic Mock > API > > Vincent Massol wrote: > > I've started migrating my existing project to the new Dynamic Mock API > > and I have the following questions (maybe this could be the start of a > > migration guide or user guide?): > > > > - what is now replacing the setupDefaultResult() method? > > Ex: mockRequest.setupDefaultResult(String.class, null); > > > > - what's the difference between expect*() and match*()? It seems to me > > that the verify() will trigger a check to verify that the expect*() > > calls did actually happen whereas this would not be checked for the > > match*() ones? Is that correct? > > match tells the mock to return a result when it, um, matches a given > call. It's a bit more flexible than the old return code. Presumably > matching ANY would count as a default result although I don't think > we've tried that. Ok thanks. Then I don't understand the difference between match*() and expectAndReturn(). -Vincent > > > Tim, can you answer the rest? > > S. |