David Kubecka
04/12/2023, 10:12 AM@Autowired lateinit var x
DI pattern. I'm mocking the method exactly to avoid initializing the dependency, yet once I do
every { myService.methodUsingX() } ...
I get lateinit property x has not been initialized
. Is this expected?Mattia Tommasone
04/12/2023, 10:50 AMMattia Tommasone
04/12/2023, 10:50 AMDavid Kubecka
04/12/2023, 11:38 AMmyService
is instatiated explicitly. And that was the problem - I forgot wrapping it with spyk
:-)