I am trying to launch a fragment with object as a parameter in my Espresso test case and I am unable to do so.
val homeFragment= launchFragmentInContainer(themeResId = R.style.AppTheme_NoActionBar)
But I want to send an object to the HomeFragment class.
For eg: val homeType:HomeType
I want to pass the homeType object to the below line of code, need help with how to do it. val homeFragment= launchFragmentInContainer(themeResId = R.style.AppTheme_NoActionBar)
I have looked into documentation and stackoverflow link(added below) and I am not able to get the desired solution.
https://developer.android.com/guide/fragments/test
Best practice for instantiating a new Android Fragment
Please help me with this issue.