lannyf77
lannyf77
using mockk for unit test, and would like to mock the BuilConfig.DEBUG. ``` io.mockk.mockkObject(BuildConfig::class) // or mockkStatic io.mockk.every { BuildConfig.DEBUG } returns true //
seeing the `Illegal reflective access by io.mockk.InternalPlatformDsl ` on java 11 (android) robolectric : "4.7.3", jacoco : "0.8.7", junitVersion : "4.13.2", mockVersion : "1.11.0", andriodxTestCore : "1.4.0", androidxTestRunner : "1.4.0",...
when spy on a interface object, it got ``` WARNING: Failed to transform class com/module/EvntHandleTest$test_evtListener$1$listener$1 java.lang.IncompatibleClassChangeError: ``` the class: ``` /// open class TestClass(internal var mListener: EventListener?) { fun interface...
Having a kotlin singleton with static methods ``` internal object TestSingleton { @JvmStatic fun staticMethod1 (str: String) { println("+++ === +++ TestSingleton.staticMethod(), $str") staticMethod2 (str) } @JvmStatic fun staticMethod2 (str:...
upgrade to 0.182.0 from 0.95, the app does not show got error in log. ``` Deprecation notice: [conn] RSockets are being deprecated at Flipper. Please, use the latest Flipper client...
Tryin to mock the android.content.pm.PackageInfo, and stub the versionName. ``` @Test fun test_() { val pInfoMock = mockk() every { pInfoMock.versionName } returns "test_version". //
android project, having some unit test working fine until updated to java 17. Here is a simplified test to show that the `spyk(HashMap())` gets error ``` @Test fun test_() {...