I am using ActivityInstrumentationTestCase2 for the unit testing of my application. I have a case where user clicks on a button of Activity 'A' and which in turns open a new Activity 'B' where user will do some work and finally some data is returned to Activity 'A' via setResult(RESULT_OK, intent);
Now, i want to test this via jUnit and want to Mock this workflow so that no user interaction is required. Can someone help me with this.
PS: i dont want to use Robotium for this..i just want to do it via plain ActivityInstrumentationTestCase2 and some Mocking framework.