android, how to use mockk to mock BuildConfig.DEBUG

2.4k Views Asked by At

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 //<=== throws

but it throws exception

Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock

How to mock the BuildConfig.DEBUG using mockk?

0

There are 0 best solutions below