I am trying to test a Fragment in isolation. To do this, I am trying FragmentScenario.
Android Documentation offers a really good example here. But My test always fails because my fragment cast the activity to an interface at onAttach.
FragmentScenario luanches a container Activity which (obviously) does not implement the interface required by my fragment.
My question is how to get around this? How to I force the container activity to implement the interface I need? or Is there a better way of doing this? Maybe remove the casting on onAttach and replace with with a different method?