06/30/2022, 3:11 AM
Kotlin - how to unit test function with nested suspend function I'm wrapper a function into another one, making the function as a parameter to the other, but I'm having a hard time to modify the existing unit test. The wrapper function is called withLock(), which do something before and after the real function. Pasting my code below: Original standalone function V1 and its unit test suspend fun V1 : RandomType ( // Step A // Step B // Step C return RandomType ) @Test fun
test V1
( // stubStepA // stubStepB // stubStepC...