I'm trying to mock a method that returns an array. I discovered http://code.google.com/p/mockito/issues/detail?id=285 , which gives some clues about how to do this, but I can't connect the dots. This seems to be the solution for mocking a method that returns a collection, whether the data you want to simulate is an array or collection. That's not quite what I need. I'm currently using PowerMockito for these specific tests, but I don't think that helps me here.
--
You received this message because you are subscribed to the Google Groups "mockito" group.
To post to this group, send email to moc...@googlegroups.com.
To unsubscribe from this group, send email to mockito+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mockito?hl=en.
I must be missing something. The “foo()” method returns “String[]”, but your “when” clause is having it return two String arrays. Does it concatenate them? How do I make it return a single array of String?