Artjom.Kalita
unread,Mar 7, 2011, 9:58:43 AM3/7/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Java User Group Latvia
Hello, have some question about Mockito usage. I have a method -
getSomethingAmount() in some class (class A) I want to test. This
getSomethingAmount() method logic depends on Set<B> bSet, which is
passed in constructor on class A initialization. For example if
Set<B> bSet contains of 2 elements, when getSomethingAmount() must
return 2 elements. How can I correctly verify this condition with
Mockito ?
P.S. Now I stub 2 B class elements put them into bSet and then assert
getSomethingAmount() method result with junit assertion - it works,
but it doesn't looks to time like "true" Mockito way.