I'm writing tests for an activity (my test class extends ActivityInstrumentationTestCase2), I've got some basic tests written and working fine.
However my activity when it completes returns extra data to the calling activity via setResult(resultcode, Intent i) What I'd like to do using instrumentation get my activity to finish, then check what it passed in the setResult call.
Is there some framework provided way of doing this? i haven't been able to find anything yet, one approach would be to subclass the activity class and override setResult to have it remember & expose what was passed to setResult (turns out setResult is final, so you can't do this either), it seems like there should be a better way.