Closed GoogleCodeExporter closed 8 years ago
Hi your snippet should work !
You should check there isn't any other matcher used somewhere else.
Also which version of Mockito are you using ?
Cheers
Brice
Original comment by brice.du...@gmail.com
on 27 Aug 2012 at 9:49
Yes, it should work and it works if I replace ViewCriteriaRow with, say, Row.
No other matchers.
If you look at the stack trace, you'll see that Mockito tries to invoke real
setAttribute method from oracle.jbo.ViewCriteriaRow class. Is that normal?
I use Mockito 1.9.5-rc1, of course, sorry for not mentioning this.
Original comment by discordi...@gmail.com
on 27 Aug 2012 at 1:51
I took a look at the javadoc
http://docs.oracle.com/cd/B13597_05/web.904/b10391/oracle/jbo/ViewCriteriaRow.ht
ml#setAttribute(java.lang.String,%20java.lang.Object). If this is the correct
javadoc, your method is final, and it might cause problems with Mockito.
It's weird actually that the current error message doesn't state that the
method is final! I think it should be reported while stubing, though!
Original comment by brice.du...@gmail.com
on 27 Aug 2012 at 2:06
Oh, you're right, it's final! Now when I know this I am able to mock it with
PowerMock. Maybe this issue's title should be changed to reflect misguiding
error message.
Original comment by discordi...@gmail.com
on 28 Aug 2012 at 1:23
Yes, will do, thanks for reporting the issue :)
Original comment by brice.du...@gmail.com
on 3 Sep 2012 at 9:57
Hi the message in 1.9.5-rc1 and trunk warns about the final methods, you should
check that you really have mockito 1.9.5-rc1 in your classpath (there might be
some maven tricks there).
Cheers,
Original comment by brice.du...@gmail.com
on 6 Sep 2012 at 6:02
Original comment by brice.du...@gmail.com
on 2 Dec 2012 at 10:21
Original comment by szcze...@gmail.com
on 16 Aug 2014 at 2:43
Original comment by szcze...@gmail.com
on 24 Aug 2014 at 3:14
Original comment by szcze...@gmail.com
on 24 Aug 2014 at 3:50
Original issue reported on code.google.com by
discordi...@gmail.com
on 27 Aug 2012 at 5:56