https://kotlinlang.org logo
#mockk
Title
# mockk
c

Chris Margonis

01/08/2019, 3:23 PM
Hi folks, thanks for the awesome library 💪 I have a question, is it possible to mock a constructor invocation and thus return a mock? Something similar to powermock’s
Copy code
PowerMockito.whenNew(RandomClass.class).withAnyArguments().thenReturn(myMock)
nvm with a more thorough searching I found Oleksiy’s statement at https://github.com/mockk/mockk/issues/163
😃 1
4 Views