dhamini-poornachandra / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

Groovy usage of Mockito suggests more stackTrace work required #283

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Groovy methods (tests obviously) invoking Mockito, when unmatched cause 
erroneous implicated lines of code:

  org.mockito.exceptions.verification.NoInteractionsWanted: 
  No interactions wanted here:
  -> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  But found this interaction:
  Blah Blah

Should be

  org.mockito.exceptions.verification.NoInteractionsWanted: 
  No interactions wanted here:
  -> at foo.Bar.baz(Bar.groovy: 45)
  But found this interaction:
  Blah Blah

Original issue reported on code.google.com by paul@hammant.org on 6 Oct 2011 at 3:23

GoogleCodeExporter commented 8 years ago
Hi,

Groovy is using reflection to invoke this method. I'm not really familiar with 
groovy developement would you mind attaching a test case ?

Original comment by brice.du...@gmail.com on 6 Oct 2011 at 11:59

GoogleCodeExporter commented 8 years ago

Original comment by brice.du...@gmail.com on 30 Mar 2012 at 7:43

GoogleCodeExporter commented 8 years ago
Any updates on this issue?

Original comment by sukrit...@gmail.com on 4 Apr 2014 at 9:09

GoogleCodeExporter commented 8 years ago
Nope, do you want to contribute a test and a fix ?

Original comment by brice.du...@gmail.com on 21 Apr 2014 at 6:44

GoogleCodeExporter commented 8 years ago
In groovy, just use spock for testing. It has support for mocks and spies and 
is much more groovy-like.

Original comment by szcze...@gmail.com on 21 Apr 2014 at 7:07

GoogleCodeExporter commented 8 years ago
I have been using spock for other projects. However, my current project (using 
AWS Flow) does not integrate with spock well, so was trying to make things work 
with Mockito. 

Original comment by sukrit...@gmail.com on 21 Apr 2014 at 7:50

GoogleCodeExporter commented 8 years ago
Oh I see. Did you ask on spock mailing list? Tell PeterN that I've sent you :)

Original comment by szcze...@gmail.com on 21 Apr 2014 at 7:51