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
Hi, I'm using your hidden API, but having an issue with tests:
For unknown reason I can't mock android classes, such as Content in my Android project unit tests. So it gives error:
"Absent Code attribute in method that is not native or abstract in class file android/content/Context"
The example of a functionality and a test:
class SomeClassWithAndroidClass(
private val context: Context // this even is not used, but fails
) {
val myField = 42
}
class SomeClassWithAndroidClassTest {
@Test // import org.junit.jupiter.api.Test
fun `Verify field`() {
val someClassWithAndroidClass = SomeClassWithAndroidClass(mockk())
assert(someClassWithAndroidClass.myField == 3)
}
}
I use jupiter version 5.8.1, junit platform version 1.8.1, mockk version 1.12.0, kotlin version 1.6.21 in build.gradle I have:
Hi, I'm using your hidden API, but having an issue with tests:
For unknown reason I can't mock android classes, such as Content in my Android project unit tests. So it gives error:
"Absent Code attribute in method that is not native or abstract in class file android/content/Context"
The example of a functionality and a test:
I use jupiter version 5.8.1, junit platform version 1.8.1, mockk version 1.12.0, kotlin version 1.6.21 in build.gradle I have:
Maybe you have an idea, what can resolve this?
The text was updated successfully, but these errors were encountered: