use of org.robolectric.annotation.experimental.LazyApplication in project robolectric by robolectric.
the class AndroidTestEnvironmentTest method systemResources_getDisplayMetrics_correctValues.
@LazyApplication(LazyLoad.ON)
@Test
@Config(qualifiers = "w480dp-h640dp-land-hdpi")
public void systemResources_getDisplayMetrics_correctValues() {
bootstrapWrapper.callSetUpApplicationState();
DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics();
assertThat(displayMetrics.densityDpi).isEqualTo(DisplayMetrics.DENSITY_HIGH);
assertThat(RuntimeEnvironment.getQualifiers()).contains("w640dp-h480dp");
assertThat(RuntimeEnvironment.getQualifiers()).contains("land");
}
Aggregations