This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mockito Help - Problem to sort a List of mock objects.  RSS feed

robson vargas
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers.

Im using mockito to build some unit tests, as the fallow code can show:

This tests work fine. But.. look the little change:

Then i got a big NullPointerException into my compare method, in the moment that the "getState" is invoked. (o1.checkAt(States.NONE).getState() )

So i ask you, why the "getState" work if its on the test scope but fail if its on the comparator scope ?

Thanks in adv.

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!