Open obesga-tirant opened 7 years ago
Any word on this? I get this with the following
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.8.47</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.cyrusinnovation</groupId>
<artifactId>mockito-groovy-support</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.8</version>
</dependency>
Sadly, I think this project is out. And I must admit I have not the time nor the resources to fix it.
:(
There is a 'native' groovy mock feature http://groovy-lang.org/testing.html#_mockfor_and_stubfor https://dzone.com/articles/mocking-static-methods-groovy https://gist.github.com/crazy4groovy/2979077
This problem was already fixed on newer versions of Mockito.
If you can use the more recent versions of Mockito you do not need this project to make it work with Groovy—it should work out of the box. See https://github.com/mockito/mockito/issues/72#issuecomment-122256375
I am currently using Mockito 2.8.9 with Groovy 2.4.11 and it works just fine.
Not sure why the following happened to you:
I can use mockito with groovy only with @compilestatic classes
If you post stack trace and how to reproduce the issue, maybe we can help.
I can use mockito with groovy only with @CompileStatic classes I tried to use this library, but everytime I launch the test (compilestatic or not) this error ir thrown
With
Exception