Join Slack
Powered by
Hi! is it possible to mock every function/property...
# mockk
m
Mikolaj
06/02/2025, 10:37 AM
Hi! is it possible to mock every function/property that returns a string in class? I have a class where all of methods and properties return string (for string resources) and I want to have something like this:
Copy code
private val i18n: I18n = mockk<I18n> { every<String> { any() } returns "" }
e
Endre Deak
06/02/2025, 1:40 PM
You could do `mock<I18n>(relaxed=true)`which mocks all your methods with something
3
Views
Open in Slack
Previous
Next