From: <ric...@vo...> - 2003-02-28 13:07:48
|
Hi Jeff You are right... I should have been more carefully in my posting and read better what's already there... Sorry for the inconvenience. Richard. > -----Original Message----- > From: Jeff Martin [mailto:je...@mk...] > Sent: Friday, February 28, 2003 01:53 PM > To: ric...@vo... > Cc: moc...@li... > Subject: Re: [MO-java-users] CommonMockPreparedStatement is using > ExpectationSet:no guaranteed iteration order > > > I can't see quite what the issue is. Which ExpectationSet are > we talking > about? The expected parameters are being stored as key value pairs so > > setObject(1,"Stuff"); > setObject(2,"More Stuff"); > > is the same as > > setObject(2,"More Stuff") ; > setObject(1,"Stuff"); > > Are we talking about > > public void setObject(int param, Object anObject, int > aTargetSQLType) > > which should maybe be calling > > setObject(param, new MapEntry(anObject, aTargetSQLType); > > but the order is still not important, it's the combintion of index, > object, type which counts. > > > > > ric...@vo... wrote: > > >Hi all, > > > >We're using mockobjects heavily for our unit tests. > > > >Currently we're testing a sql-update with PreparedStatement. > > > >I noticed that CommonMockPreparedStatement is using > ExpectationSet, which is > >using HashSet for internal storage. Since HashSet doesn't > have a guaranteed > >iteration order, it is in my opinion not suitable for > PreparedStatement. > >CommonMockPreparedStatement should use ExpectationList > instead, so the order > >is guaranteed (which is very important in a PreparedStatement...) > > > >Richard. > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by:ThinkGeek > >Welcome to geek heaven. > >http://thinkgeek.com/sf > >_______________________________________________ > >Mockobjects-java-users mailing list > >Moc...@li... > >https://lists.sourceforge.net/lists/listinfo/mockobjects-java-users > > > > > > |