Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mockito, testing org.hibernate.ScrollableResults count of 1000

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Using Mockito I want to test the condition where I get to a count of 1000 in org.hibernate.ScrollableResults, One way to do this would be to have when(scrollableResults.next()).thenReturn(true).thenReturn(true).thenReturn(true).....................................; more than thousand times. Is there a shorter way of doing this? Please let me know if you need more information.


 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can be done in the following way

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic