You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problem while trying to use Robolectric to test activity which is using EasyMvp. All of the classes are written in Kotlin.
Part of Activity:
@ActivityView(layout = R.layout.activity_access, presenter = AccessPresenterImpl::class)
class AccessActivity : BaseActivity(), AccessView {
@Presenter
lateinit var presenter: AccessPresenter
override fun providePresenter(): BasePresenter? {
return presenter
}
I was trying to introduce Robolectric tests in my app.
var activity: AccessActivity? = null
var loginEditText: EditText? = null
var passwordEditText: EditText? = null
@Before
fun initData() {
activity = Robolectric.setupActivity(AccessActivity::class.java)
loginEditText = activity?.findViewById(R.id.loginEditText)
passwordEditText = activity?.findViewById(R.id.passwordEditText)
}
But while Running the test, I am always getting error:
kotlin.UninitializedPropertyAccessException: lateinit property presenter has not been initialized
I tried numerous of ideas like changing presenter to nullable object, but EasyMVP do not compile with it.
Any solution for that?
The text was updated successfully, but these errors were encountered:
I have problem while trying to use Robolectric to test activity which is using EasyMvp. All of the classes are written in Kotlin.
Part of Activity:
I was trying to introduce Robolectric tests in my app.
But while Running the test, I am always getting error:
kotlin.UninitializedPropertyAccessException: lateinit property presenter has not been initialized
I tried numerous of ideas like changing presenter to nullable object, but EasyMVP do not compile with it.
Any solution for that?
The text was updated successfully, but these errors were encountered: