A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EasyMock- How to populate a ResultSet ?
Joined: Sep 15, 2011
Oct 21, 2011 15:02:23
EasyMock- How to populate a ResultSet for more than 1 row ?
This is how I am populating for a single row.
mockControl.expectAndReturn(mockRS.getString(1), "EmployeeId", 1);
mockControl.expectAndReturn(mockRS.getString(2), "EmployeeName", 1);
I tried this logic for 2nd row :
mockControl.expectAndReturn(mockRS.getString(1), "EmployeeId", 2);
mockControl.expectAndReturn(mockRS.getString(2), "EmployeeName", 2);
When inside the class-under-test,
excutes only once .
So, How to populate a ResultSet for more than 1 row ?
author & internet detective
Joined: May 26, 2003
Oct 21, 2011 18:55:55
Where in the
are you specifying that mockRs.next() should return true?
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: EasyMock- How to populate a ResultSet ?
generating pdf report some field are hiding in pdf
Sorting problem with HibernateSqlQuery with Websphere
h:selectOneMenu - setting the correct value
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014