0

prerequisites: Adopt OpenJDK 11, Gradle 6.8.1, Groovy 3.0, Spock 2.0,

Firstly I've got exceptions dependence with inner static builder class:

 #: [Static type checking] - Cannot find matching method java.lang.Object#withSomeMethod(int). Please check if the declared type is correct and if the method exists.

@ line #, column #. .withSomeMethod(1)

Then I declared variables in Class Specification. But I've got exceptions:

SomeSpec.groovy: 12: where-blocks may only contain parameterizations

How can I integrate static compile with Spock Parameterization Tests?

shkiper
  • 111
  • 4

1 Answers1

0

Answer from the community

@CompileStatic is not really supported for Spock, it works for some cases but not in others. In general I recommend not to use it for specs. https://gitter.im/spockframework/spock?at=61aa07658f98cb0811a2cdb1

shkiper
  • 111
  • 4