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

Davide Giuseppe Farella

08/27/2021, 1:39 PM
Hey guys, how can I return the same
Intent
here, without creating a new
mockk()
?
Copy code
mockkConstructor(Intent::class) {
  every { 
    anyConstructed<Intent>().setDataAndType(any(), any())
  } answers { 
    TODO("return same Intent") 
  }
}
e

ephemient

08/27/2021, 4:51 PM
self
d

Davide Giuseppe Farella

08/27/2021, 5:08 PM
Figured it out, thanks
4 Views