From: Tim M. <tim...@po...> - 2003-05-14 23:00:29
|
yes. The experience of the team I worked with was that the old way was highly refactored but unintuitive. > -----Original Message----- > From: moc...@li... > [mailto:moc...@li...]On Behalf Of > Vincent Massol > Sent: 14 May 2003 12:41 > To: 'Mockobjects-Java-Dev' > Subject: [MO-java-dev] Should CallSequence be called with new DynaMocks? > > > Hi, > > With the old dyna mocks, I had: > > CallSequence sequence1 = new CallSequence(); > sequence1.expectReturn(new Constraint[] {C.eq(1)}, "FIRSTNAME"); > sequence1.expectReturn(new Constraint[] {C.eq(2)}, "LASTNAME"); > mockResultSetMetaData.expect("getColumnName", sequence1); > > I guess, the new canonical way of writing this is simply: > > mockResultSetMetaData.expectAndReturn("getColumnName", C.eq(1), > "FIRSTNAME"); > mockResultSetMetaData.expectAndReturn("getColumnName", C.eq(2), > "LASTNAME"); > > Is this correct? (It works here but I'd like to make sure I'm doing it > correctly :-)). > > Thanks > -Vincent > > > > ------------------------------------------------------- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com > > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.476 / Virus Database: 273 - Release Date: 24/04/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.476 / Virus Database: 273 - Release Date: 24/04/2003 |