0

I am trying to test sealed classes in a view model:

sealed class MyActions {

data class BottomNavigate(val fragment: Fragment2) :
    MyActions()
}

How do I test BottomNavigate was called with an argument of type Fragment2 using mockk or anything else?

wamae
  • 660
  • 9
  • 21
  • Possible duplicate of https://stackoverflow.com/questions/55654822/how-to-mock-sealed-classes-with-mockk It seems you can't do that :( – triay0 Nov 04 '22 at 09:40
  • Yes, it is similar, I had looked at that question, and I also need to capture some arguments passed to the sealed class. – wamae Nov 07 '22 at 05:00

0 Answers0