https://kotlinlang.org logo
#kotest
Title
# kotest
s

Srki Rakic

10/25/2023, 12:14 AM
Any ideas why the following is failing with
Could not create instance of class com.missionlane.directmail.service.DmUploadServiceTests. Specs must have a public zero-arg constructor.
Copy code
@SpringBootTest(classes = [DmUserRepository::class])
class DmUploadServiceTests(val dmUserRepository: DmUserRepository) : StringSpec({
    "dmUserRepository should be autowired" {
        dmUserRepository.shouldNotBeNull()
    }
})
I'm using spring extension v4.4.3
l

LeoColman

10/25/2023, 12:16 AM
its a very old version, but... Do you have the constructor extension installed?
s

Srki Rakic

10/25/2023, 12:20 AM
ah interesting. I pull it from here. But here it looks like 1.2.0 is the latest
That was it. Thanks.