Robolectric : JUnit for LAunching Activity

14 views
Skip to first unread message

super Android

unread,
May 7, 2013, 3:26:14 AM5/7/13
to robol...@googlegroups.com
Hi All,

  I have a scenario where I am launching an Activity from a simple Class method like


  Class test{

 public void LaunchActivity(Context context , Activity myActivity){

                       Intent myIntent = new Intent(context, myActivity);
myIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);

         }

 } 


  I want to write a test method for LaunchActivity using Robolectric. Should I need to write a Custom Shadow class or any other  suggestion 
Reply all
Reply to author
Forward
0 new messages