Created
February 26, 2018 14:57
-
-
Save hkhc/15c22c9eb3c8603e5fa2328e5d88cd47 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* Find the AndroidManifest.xml at | |
* 1. Java resource, or | |
* 2. build/intermediates/manifests/[full or fast-start]/[build-type], | |
* which is generated by merging the AndroidManifest.xml files in | |
* src/main or source folder of other build variants. | |
*/ | |
@Runner(RobolectricTestRunner.class) | |
@Config(manifest="AndroidManifest.xml") | |
public class ExampleTest { | |
@Test | |
public void testResources() throws Exception { | |
Drawable drawable = RuntimeEnvironment.application.getResources() | |
.getDrawable(R.drawable.app_icon); | |
assertNotNull(drawable); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment