From: Joe W. <jo...@tr...> - 2003-05-15 07:03:12
|
That's right. There's no reason to use match if you're not trying to setup a return value. You can still use expect in the same way to setup return values which also have expectations on the method calls. Vincent Massol wrote: >Hi Joe, > >I thought the only difference between match*() and expect*() was that >expected methods were setting expectations that were verified when you >call the verify() method on the mock? > >Also, expectAndReturn() does also setup return values, right? > >Thanks >-Vincent (Still confused by the difference between match*() and >expect*() :-)) > > > >>-----Original Message----- >>From: Joe Walnes [mailto:jo...@tr...] >>Sent: 14 May 2003 21:38 >>To: Vincent Massol; moc...@li... >>Subject: Re: [MO-java-dev] [New DynaMock] Why is there no match() >> >> >method? > > >>Vincent Massol wrote: >> >> >> >>>Hi, >>> >>>There is an expect() method (replacing the old expectVoid()), but >>> >>> >there > > >>>is no match() method. Any reason? >>> >>> >>> >>> >>The only use of match() is to setup return values - so it's not needed >>for void methods. >> >>-joe >> >> >> > > > > |