igor.wojda
06/23/2017, 10:01 AMinterceptTestCase
and interceptSpec
seem not to be called at all
class MyTests : BehaviorSpec() {
lateinit var profilePresenter: ProfilePresenter
@Mock lateinit var mockEventBus: EventBus
override fun interceptTestCase(context: TestCaseContext, test: () -> Unit) {
super.interceptTestCase(context, test)
MockitoAnnotations.initMocks(this)
profilePresenter = ProfilePresenter(mockEventBus)
test()
}
init {
\\Tests: Given\When\Then
}
}
Error
kotlin.UninitializedPropertyAccessException: lateinit property profilePresenter has not been initialized