use of com.android.tools.idea.uibuilder.SyncNlModel in project android by JetBrains.
the class SceneKeepDimensTest method setFakeResource.
private void setFakeResource(String dimension, String value) {
Configuration configuration = Mockito.mock(Configuration.class);
ResourceResolver resolver = Mockito.mock(ResourceResolver.class);
ResourceValue resourceValue = Mockito.mock(ResourceValue.class);
when(configuration.getResourceResolver()).thenReturn(resolver);
when(configuration.getDensity()).thenReturn(Density.MEDIUM);
when(resolver.findResValue(dimension, false)).thenReturn(resourceValue);
when(resolver.resolveResValue(resourceValue)).thenReturn(resourceValue);
when(resourceValue.getValue()).thenReturn(value);
((SyncNlModel) myModel).setConfiguration(configuration);
}
Aggregations