I have created an app that sends intents among multiple activities. After doing some research i have found that the ActivityUnitTestCase class is designed for unit testing while the ActivityInstrumentationTestCase2 is designed for functional testing. I understand the use of methods such as setUp(), tearDown(), and testPreconditions(). However i am having a little difficulty in trying to figure out what type of user-defined-tests to create in the previously mentioned classes. I know that there are a few methods that cannot be called in certain classes.
To be more specific, if i am in activity A and i click a button then it calls startActivityForResult() which starts activity B. I then send an intent back to activity A which is handled in the onActivityResult() method. How can i test that the actual result in onActivityResult() is equal to the expected result? Is there some sort of mock dependency for interaction between multiple activities? And if so how do you create mock dependencies? I have been looking extensively for any kind of examples that would help clear up this confusion. I have seen the Demo APIs on the developer.android.com website but they are rather limited. If anyone could provide any assistance i would greatly appreciate it. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en