grails 4 unit test controller could not find class

I am using grails 4 to create unit test for controller

My controller is under grails-app/controllers/mypack/myfolder/exampleController.groovy

My unit test is under src/test/groovy/mypack/myfolder/exampleControllerSpec.groovy

my unit test is like this class DemoControllerSpec extends Specification implements ControllerUnitTest< exampleController>

but it complain can not resolve symbol 'exampleController'

anything wrong here?

how to import exampleController

Read more here:

Content Attribution

This content was originally published by Lee at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: