summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java98
1 files changed, 56 insertions, 42 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
index 861730134e..cc67c8a81c 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
@@ -124,11 +124,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-cap");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((String) layer.getLineCap().getValue());
+ assertNull(layer.getLineCap().getValue());
// Set and Get
- layer.setProperties(lineCap(LINE_CAP_BUTT));
- assertEquals((String) layer.getLineCap().getValue(), (String) LINE_CAP_BUTT);
+ String propertyValue = LINE_CAP_BUTT;
+ layer.setProperties(lineCap(propertyValue));
+ assertEquals(layer.getLineCap().getValue(), propertyValue);
});
}
@@ -139,11 +140,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-join");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((String) layer.getLineJoin().getValue());
+ assertNull(layer.getLineJoin().getValue());
// Set and Get
- layer.setProperties(lineJoin(LINE_JOIN_BEVEL));
- assertEquals((String) layer.getLineJoin().getValue(), (String) LINE_JOIN_BEVEL);
+ String propertyValue = LINE_JOIN_BEVEL;
+ layer.setProperties(lineJoin(propertyValue));
+ assertEquals(layer.getLineJoin().getValue(), propertyValue);
});
}
@@ -170,11 +172,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-miter-limit");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineMiterLimit().getValue());
+ assertNull(layer.getLineMiterLimit().getValue());
// Set and Get
- layer.setProperties(lineMiterLimit(0.3f));
- assertEquals((Float) layer.getLineMiterLimit().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineMiterLimit(propertyValue));
+ assertEquals(layer.getLineMiterLimit().getValue(), propertyValue);
});
}
@@ -185,11 +188,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-round-limit");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineRoundLimit().getValue());
+ assertNull(layer.getLineRoundLimit().getValue());
// Set and Get
- layer.setProperties(lineRoundLimit(0.3f));
- assertEquals((Float) layer.getLineRoundLimit().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineRoundLimit(propertyValue));
+ assertEquals(layer.getLineRoundLimit().getValue(), propertyValue);
});
}
@@ -215,11 +219,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-opacity");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineOpacity().getValue());
+ assertNull(layer.getLineOpacity().getValue());
// Set and Get
- layer.setProperties(lineOpacity(0.3f));
- assertEquals((Float) layer.getLineOpacity().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineOpacity(propertyValue));
+ assertEquals(layer.getLineOpacity().getValue(), propertyValue);
});
}
@@ -261,11 +266,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-color");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((String) layer.getLineColor().getValue());
+ assertNull(layer.getLineColor().getValue());
// Set and Get
- layer.setProperties(lineColor("rgba(0, 0, 0, 1)"));
- assertEquals((String) layer.getLineColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ String propertyValue = "rgba(0, 0, 0, 1)";
+ layer.setProperties(lineColor(propertyValue));
+ assertEquals(layer.getLineColor().getValue(), propertyValue);
});
}
@@ -321,11 +327,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-translate");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float[]) layer.getLineTranslate().getValue());
+ assertNull(layer.getLineTranslate().getValue());
// Set and Get
- layer.setProperties(lineTranslate(new Float[] {0f, 0f}));
- assertEquals((Float[]) layer.getLineTranslate().getValue(), (Float[]) new Float[] {0f, 0f});
+ Float[] propertyValue = new Float[] {0f, 0f};
+ layer.setProperties(lineTranslate(propertyValue));
+ assertEquals(layer.getLineTranslate().getValue(), propertyValue);
});
}
@@ -336,11 +343,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-translate-anchor");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((String) layer.getLineTranslateAnchor().getValue());
+ assertNull(layer.getLineTranslateAnchor().getValue());
// Set and Get
- layer.setProperties(lineTranslateAnchor(LINE_TRANSLATE_ANCHOR_MAP));
- assertEquals((String) layer.getLineTranslateAnchor().getValue(), (String) LINE_TRANSLATE_ANCHOR_MAP);
+ String propertyValue = LINE_TRANSLATE_ANCHOR_MAP;
+ layer.setProperties(lineTranslateAnchor(propertyValue));
+ assertEquals(layer.getLineTranslateAnchor().getValue(), propertyValue);
});
}
@@ -366,11 +374,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-width");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineWidth().getValue());
+ assertNull(layer.getLineWidth().getValue());
// Set and Get
- layer.setProperties(lineWidth(0.3f));
- assertEquals((Float) layer.getLineWidth().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineWidth(propertyValue));
+ assertEquals(layer.getLineWidth().getValue(), propertyValue);
});
}
@@ -412,11 +421,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-gap-width");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineGapWidth().getValue());
+ assertNull(layer.getLineGapWidth().getValue());
// Set and Get
- layer.setProperties(lineGapWidth(0.3f));
- assertEquals((Float) layer.getLineGapWidth().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineGapWidth(propertyValue));
+ assertEquals(layer.getLineGapWidth().getValue(), propertyValue);
});
}
@@ -458,11 +468,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-offset");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineOffset().getValue());
+ assertNull(layer.getLineOffset().getValue());
// Set and Get
- layer.setProperties(lineOffset(0.3f));
- assertEquals((Float) layer.getLineOffset().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineOffset(propertyValue));
+ assertEquals(layer.getLineOffset().getValue(), propertyValue);
});
}
@@ -488,11 +499,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-blur");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float) layer.getLineBlur().getValue());
+ assertNull(layer.getLineBlur().getValue());
// Set and Get
- layer.setProperties(lineBlur(0.3f));
- assertEquals((Float) layer.getLineBlur().getValue(), (Float) 0.3f);
+ Float propertyValue = 0.3f;
+ layer.setProperties(lineBlur(propertyValue));
+ assertEquals(layer.getLineBlur().getValue(), propertyValue);
});
}
@@ -534,11 +546,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-dasharray");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((Float[]) layer.getLineDasharray().getValue());
+ assertNull(layer.getLineDasharray().getValue());
// Set and Get
- layer.setProperties(lineDasharray(new Float[] {}));
- assertEquals((Float[]) layer.getLineDasharray().getValue(), (Float[]) new Float[] {});
+ Float[] propertyValue = new Float[] {};
+ layer.setProperties(lineDasharray(propertyValue));
+ assertEquals(layer.getLineDasharray().getValue(), propertyValue);
});
}
@@ -564,11 +577,12 @@ public class LineLayerTest extends BaseActivityTest {
Timber.i("line-pattern");
invoke(mapboxMap, (uiController, mapboxMap) -> {
assertNotNull(layer);
- assertNull((String) layer.getLinePattern().getValue());
+ assertNull(layer.getLinePattern().getValue());
// Set and Get
- layer.setProperties(linePattern("pedestrian-polygon"));
- assertEquals((String) layer.getLinePattern().getValue(), (String) "pedestrian-polygon");
+ String propertyValue = "pedestrian-polygon";
+ layer.setProperties(linePattern(propertyValue));
+ assertEquals(layer.getLinePattern().getValue(), propertyValue);
});
}