Created
February 22, 2017 10:34
-
-
Save atomgomba/0808503287ba089956da31884a27dd1e to your computer and use it in GitHub Desktop.
Mocking using mock android.jar
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
class TestContext extends MockContext { | |
@Override public MockResources getResources() { | |
return new TestResources(); | |
} | |
} | |
class TestResources extends MockResources { | |
@Override public String getString(int id) { | |
return "foo is a bar"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment