android - Shadow Fragments in Robolectric? -


i trying test drive android code robolectric. need check bundle sending intent in order create new activity contains expect to.

looking around online, found mention of shadowfragment in robolectric 2.0-alpha 1 documents has getarguments() seems need, doesn't seem mentioned @ in 2.4 documents , can't org.robolectric.shadows.shadowfragment resolve.

has moved, there workaround, or there direction need go in order inspect activity's bundle in robolectric?

any appreciated.

i hope understood needs correctly.

so assume need next code in test:

public void activityfiredcorrectly_whensomethingdone() {     // code launch activity      intent nextstartedactivity = shadowapplication.getinstance().getnextstartedactivity();      // check intent parameters } 

if not enough inspect shadow of intent:

shadowintent shadowintent = shadowof(nextstartedactivity); 

hope helps


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -