Question: How to test router in unit tests?
emartynov opened this issue · 2 comments
emartynov commented
Hi people,
we are using Cicerone with Fragments.
I'm trying to write a simple test around router class. I can verify that FragmentScreen is the argument of the replace method in Router. However, to test what is specific fragment I should probably call fragment factory and check type of the created fragment.
What is your approach for testing a router with fragments?
emartynov commented
Did I ask something stupid and/or it was already answered?
terrakok commented
No. But I think that nobody tested router calls yet. You are right that if you want to check screen fragment instance then you have to call factory.