When I try to access my component testDataOperationsProcessor like this:
@Component
class TestStateListener : ITestListener {
private lateinit var testDataOperationsProcessor: TestDataOperationsProcessor
@Autowired
fun setTestDataOperationsProcessor(testDataOperationsProcessor: TestDataOperationsProcessor){
this.testDataOperationsProcessor = testDataOperationsProcessor
}
override fun onTestStart(testResult: ITestResult) {
testDataOperationsProcessor.beforeTestOperation(testResult)
}
override fun onTestFailure(testResult: ITestResult) {
testDataOperationsProcessor.afterTestOperation(testResult)
}
override fun onTestSuccess(testResult: ITestResult) {
testDataOperationsProcessor.afterTestOperation(testResult)
}
}
I am getting: kotlin.UninitializedPropertyAccessException: lateinit property testDataOperationsProcessor has not been initialized
I need to access the component properly, any ideas what might be the issue here?