Artjom.Kalita
unread,Mar 8, 2011, 5:33:28 AM3/8/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 mockito
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 bSet, which is passed
in constructor on class A initialization. For example if Set bSet
contains of 2 objects with Status.OK, when getSomethingAmount() must
return 2. How can I correctly verify this condition with Mockito ?
P.S. Now I stub 2 B class type objects, put them into bSet and then
assert getSomethingAmount() method result with JUnit assertion - it
works, but it doesn't looks to me like "true" Mockito way.