In my Kotlin project, I have the following class:
class NewTest {
@Rule
@JvmField
var activityTestRule: ActivityTestRule<NewActivity> =
ActivityTestRule(NewActivity::class.java, false, false)
.....
}
as the activity rule
will be used in most of my test, I decided to write something like:
class BaseTestClass<T> {
@Rule
@JvmField
var activityTestRule: ActivityTestRule<T> =
ActivityTestRule(T::class.java, false, false)
.....
}
but this is not working. Any idea is it possible at all?