Created
November 3, 2020 22:30
-
-
Save TechIsFun/bc6c9c8e57572134ee49322c78737e72 to your computer and use it in GitHub Desktop.
Usage of ForceLocaleRule
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
@RunWith(AndroidJUnit4.class) | |
public class MyActivityTest { | |
@ClassRule | |
public static final ForceLocaleRule localeTestRule = new ForceLocaleRule(Locale.UK); | |
@Rule | |
public ActivityTestRule<MyActivity> mMyActivityRule = new ActivityTestRule<>(MyActivity.class); | |
private Context mContext; | |
@Before | |
public void setUp() { | |
// ... | |
} | |
@Test | |
public void testSomeMethod() { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment