[android] - remove timer from compassView, make fading when facing north optional. (#6786)

save state for recreating map view

fix review comments

unit test covering default value for fading and setting a new value

fixup setter, fix default value
This commit is contained in:
Tobrun
2016-10-25 15:53:16 +02:00
committed by GitHub
parent 94b1a53f06
commit b0485bccd9
11 changed files with 165 additions and 76 deletions

View File

@@ -7,6 +7,7 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
@@ -56,6 +57,13 @@ public class UiSettingsTest {
assertTrue("Compass margin bottom should be same", uiSettings.getCompassMarginBottom() == 4);
}
@Test
public void testCompassFadeWhenFacingNorth(){
assertTrue("Compass should fade when facing north by default.", uiSettings.isCompassFadeWhenFacingNorth());
uiSettings.setCompassFadeFacingNorth(false);
assertFalse("Compass fading should be disabled", uiSettings.isCompassFadeWhenFacingNorth());
}
@Test
public void testLogoEnabled() {
uiSettings.setLogoEnabled(true);