I have a project in android. I want to test it in junit. In the resources, insinide strings.xml
I have a string array called labels_array
. How can I access (get) this string array from a test method in junit?
In the test class I have
@Rule
public ActivityScenarioRule mActivityRule = new ActivityScenarioRule<>(
MainActivity.class);
and
@Test
public void fooTest() {
ActivityScenario scenario = mActivityRule.getScenario();
}
But How can I use these rule and method in order to acess the string array from inside the method fooTest
?
context
that says "access can be provate". – Honorine