Created
January 25, 2012 05:25
-
-
Save daneko/1674899 to your computer and use it in GitHub Desktop.
Android AndroidTestCaseからTestプロジェクトのコンテキスト取得方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/ussy/sqlite-fixture 参考 | |
// @hideなので以下のようになる | |
Context getTestprojectContext( AndroidTestCase testProject){ | |
Method method = testProject.getClass().getMethod("getTestContext", new Class[0]); | |
return ((Context) method.invoke(testProject, new Object[0])); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment