grails 4 unit test controller could not find class

I am using grails 4 to create unit test for controller https://testing.grails.org/latest/guide/index.html

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: https://stackoverflow.com/questions/65723769/grails-4-unit-test-controller-could-not-find-class

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: