[android] #4800 - correct background offsets from attributes
This commit is contained in:
@@ -49,14 +49,9 @@ public class MyLocationViewSettingsTest {
|
||||
@Test
|
||||
public void testBackgroundDrawable() {
|
||||
Drawable backgroundDrawable = mock(Drawable.class);
|
||||
locationViewSettings.setBackgroundDrawable(backgroundDrawable);
|
||||
assertEquals("foreground should match", backgroundDrawable, locationViewSettings.getBackgroundDrawable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBackgroundOffset() {
|
||||
int[] offset = new int[]{1, 2, 3, 4};
|
||||
locationViewSettings.setBackgroundOffset(1, 2, 3, 4);
|
||||
locationViewSettings.setBackgroundDrawable(backgroundDrawable, offset);
|
||||
assertEquals("foreground should match", backgroundDrawable, locationViewSettings.getBackgroundDrawable());
|
||||
assertTrue("offsets should match", Arrays.equals(offset, locationViewSettings.getBackgroundOffset()));
|
||||
}
|
||||
|
||||
@@ -68,7 +63,7 @@ public class MyLocationViewSettingsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBackgroundTint(){
|
||||
public void testBackgroundTint() {
|
||||
int color = Color.RED;
|
||||
locationViewSettings.setBackgroundTintColor(Color.RED);
|
||||
assertEquals("color should match", color, locationViewSettings.getBackgroundTintColor());
|
||||
|
||||
Reference in New Issue
Block a user