I have the following JUnit test:
public class JavaTest {
final int value = 2;
@Test
@Repeat(times = value)
public void test() {
fail("Not yet implemented");
}
}
The @Repeat
annotation comes from easytest-core, and the exact definition is here.
When I compile this as java source everything builds (and runs) fine. When I compile the exact same thing as groovy source, I get:
Groovy:Attribute 'times' should have type 'java.lang.Integer'; but found type 'java.lang.Object' in @org.easetech.easytest.annotation.Repeat GroovyTest.groovy
After searching the internets, I found a few similar discussions on SO and jira.codehaus, but those deal with String - GString problems, so the solutions do not work for me.
How can I fix this?
Updates:
- java.version=1.7.0_76
- groovy.version=2.3.7