This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Testing and the fly likes Iterator in EasyMock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Iterator in EasyMock" Watch "Iterator in EasyMock" New topic
Author

Iterator in EasyMock

vivek dhiman
Ranch Hand

Joined: Aug 05, 2011
Posts: 146

Hi

I have the below function which i want to test.



TestCase so far i written is :



I am not sure how to proceed with iterator in testcase. Can someone provide the snippet how to use this.

Thanks
Tim Cooke
Sheriff

Joined: Mar 28, 2008
Posts: 2242
    
101

The while loop serves no purpose in that method at all. What do you want to assert?

The use of EasyMock makes your test code look really unpleasant. It might be easier to construct a real Session object instead.


Tim Driven Development
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iterator in EasyMock
 
jQuery in Action, 3rd edition