[android] #4018 - migrated max/min zoom to UiSettings + added tests + update sample app
This commit is contained in:
@@ -21,6 +21,30 @@ public class UiSettingsTest {
|
||||
assertNotNull("uiSettings should not be null", uiSettings);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMinZoom() {
|
||||
double zoom = 10;
|
||||
UiSettings uiSettings = new UiSettings(mMapView);
|
||||
uiSettings.setMinZoom(zoom);
|
||||
assertEquals("MinZoom should match", zoom, uiSettings.getMinZoom(), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMaxZoom() {
|
||||
double zoom = 10;
|
||||
UiSettings uiSettings = new UiSettings(mMapView);
|
||||
uiSettings.setMaxZoom(zoom);
|
||||
assertEquals("MaxZoom should match", zoom, uiSettings.getMaxZoom(), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInitialZoomLevels() {
|
||||
//we are mocking MapView we expect a value of 0 to be returned
|
||||
UiSettings uiSettings = new UiSettings(mMapView);
|
||||
assertEquals("MaxZoom should match", 0, uiSettings.getMaxZoom(), 0);
|
||||
assertEquals("MinZoom should match", 0, uiSettings.getMinZoom(), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCompassEnabled() {
|
||||
UiSettings uiSettings = new UiSettings(mMapView);
|
||||
@@ -204,7 +228,6 @@ public class UiSettingsTest {
|
||||
assertEquals("Scroll gesture should be disabled", false, uiSettings.isScrollGesturesEnabled());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testInvalidate() {
|
||||
UiSettings uiSettings = new UiSettings(mMapView);
|
||||
|
||||
Reference in New Issue
Block a user