I created a very simple test function as below
class SimpleClassTest {
lateinit var simpleObject: SimpleClass
@Mock lateinit var injectedObject: InjectedClass
@Before
fun setUp() {
MockitoAnnotations.initMocks(this)
}
@Test
fun testSimpleFunction() {
simpleObject = lookupInstance()
}
inline fun lookupInstance() = SimpleClass(injectedObject)
}
I Run it with Coverage... The test coverage number is 0%. But if I remove the inline
keyword, the test coverage number shows now.
Is this a Kotlin issue or Android IntelliJ IDEA Coverage issue? (note: JaCoco coverage is good).
Note: I'm using Android Studio 2.0 and Kotlin 1.0.2