Create a subclass of
InstrumentationTestCase<http://developer.android.com/reference/android/test/InstrumentationTestCase.html>
instead
of AndroidTestCase. From there you can call
getInstrumentation().getContext().

Regards,
Brett.

On Mon, Oct 26, 2009 at 1:46 PM, Markus <[email protected]> wrote:
>
> I'd like to load some data from the assets folder of my test project.
>
> Unfortunately AndroidTestCase.getContext().getAssets() returns an
> AssetManager for the target project, not the test project.
>
> Class android.app.Instrumentation seems to have what I am looking for:
> getContext() and getTargetContext. But from where do I get an instance
> of that class?
>
> Thanks in advance,
> Markus
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to