[android] - add get source id to supported layer types

This commit is contained in:
tobrun
2018-09-03 15:43:12 +02:00
committed by Tobrun
parent 18b43f29cf
commit 42aaf3e346
21 changed files with 229 additions and 0 deletions

View File

@@ -50,6 +50,18 @@ public class CircleLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class FillExtrusionLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class FillLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class HeatmapLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class HillshadeLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class LineLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class RasterLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -50,6 +50,18 @@ public class SymbolLayerTest extends BaseActivityTest {
});
}
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
@Test
public void testSetVisibility() {
validateTestSetup();

View File

@@ -60,6 +60,20 @@ public class <%- camelize(type) %>LayerTest extends BaseActivityTest {
});
<% } -%>
}
<% if (type !== 'background') { -%>
@Test
public void testSourceId() {
validateTestSetup();
setupLayer();
Timber.i("SourceId");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
// Get source id
assertEquals(layer.getSourceId(), "composite");
});
}
<% } -%>
@Test
public void testSetVisibility() {