summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps
diff options
context:
space:
mode:
authorTobrun <tobrun@mapbox.com>2016-02-18 11:16:05 +0100
committerTobrun <tobrun@mapbox.com>2016-02-18 11:48:10 +0100
commitcd13e2b769a937a805ca4bc509c07524a6a949de (patch)
treec268acc4def1f2ce95845e09653e13a2403917a2 /platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps
parenta24d06b9925c302fe4f4c3db754468c7dc9aa3ef (diff)
downloadqtlocation-mapboxgl-cd13e2b769a937a805ca4bc509c07524a6a949de.tar.gz
[android] #4005 move annotations to correct package
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MarkerTest.java76
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolygonTest.java79
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolylineTest.java77
3 files changed, 0 insertions, 232 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MarkerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MarkerTest.java
deleted file mode 100644
index efe94e5396..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MarkerTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.mapbox.mapboxsdk.maps;
-
-import com.mapbox.mapboxsdk.annotations.Marker;
-import com.mapbox.mapboxsdk.annotations.MarkerOptions;
-import com.mapbox.mapboxsdk.geometry.LatLng;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class MarkerTest {
-
- @Test
- public void testSanity() {
- MarkerOptions markerOptions = new MarkerOptions();
- assertNotNull("markerOptions should not be null", markerOptions);
- }
-
- @Test
- public void testMarker() {
- MarkerOptions markerOptions = new MarkerOptions();
- assertNotNull("marker should not be null", markerOptions.getMarker());
- }
-
- @Test
- public void testPosition() {
- Marker marker = new MarkerOptions().position(new LatLng(10, 12)).getMarker();
- assertEquals(marker.getPosition(), new LatLng(10, 12));
- }
-
- @Test
- public void testTitle() {
- Marker marker = new MarkerOptions().title("Mapbox").getMarker();
- assertEquals(marker.getTitle(), "Mapbox");
- }
-
- @Test
- public void testSnippet() {
- Marker marker = new MarkerOptions().snippet("Mapbox").getMarker();
- assertEquals(marker.getSnippet(), "Mapbox");
- }
-
- @Test
- public void testBuilder() {
- Marker marker = new MarkerOptions().title("title").snippet("snippet").position(new LatLng(10, 12)).getMarker();
- assertEquals(marker.getTitle(), "title");
- assertEquals(marker.getSnippet(), "snippet");
- assertEquals(marker.getPosition(), new LatLng(10, 12));
- }
-
- @Test
- public void testIcon() {
- // find a way to test Icon
- }
-
- @Test
- public void testHashCode() {
- Marker marker = new MarkerOptions().position(new LatLng(10, 12)).getMarker();
- assertEquals("hash code should match", marker.hashCode(), -1946419200);
- }
-
- @Test
- public void testEquality() {
- Marker markerOne = new MarkerOptions().position(new LatLng(0, 0)).getMarker();
- Marker markerTwo = new MarkerOptions().position(new LatLng(0, 0)).getMarker();
- assertEquals(markerOne, markerTwo);
- }
-
- @Test
- public void testToString() {
- Marker marker = new MarkerOptions().position(new LatLng(0, 0)).getMarker();
- assertEquals(marker.toString(), "Marker [position[" + "LatLng [longitude=0.0, latitude=0.0, altitude=0.0]" + "]]");
- }
-
-}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolygonTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolygonTest.java
deleted file mode 100644
index 281277692f..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolygonTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.mapbox.mapboxsdk.maps;
-
-import com.mapbox.mapboxsdk.annotations.Polygon;
-import com.mapbox.mapboxsdk.annotations.PolygonOptions;
-import com.mapbox.mapboxsdk.annotations.Polyline;
-import com.mapbox.mapboxsdk.annotations.PolylineOptions;
-import com.mapbox.mapboxsdk.geometry.LatLng;
-
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class PolygonTest {
-
- @Test
- public void testSanity() {
- PolygonOptions polygonOptions = new PolygonOptions();
- assertNotNull("polygonOptions should not be null", polygonOptions);
- }
-
- @Test
- public void testPolygon() {
- Polygon polygon = new PolygonOptions().getPolygon();
- assertNotNull("polyline should not be null", polygon);
- }
-
- @Test
- public void testAlpha() {
- Polygon polygon = new PolygonOptions().alpha(0.5f).getPolygon();
- assertEquals(0.5f, polygon.getAlpha(), 0.0f);
- }
-
- @Test
- public void testStrokeColor() {
- Polygon polygon = new PolygonOptions().strokeColor(1).getPolygon();
- assertEquals(1, polygon.getStrokeColor());
- }
-
- @Test
- public void testFillColor() {
- Polygon polygon = new PolygonOptions().fillColor(1).getPolygon();
- assertEquals(1, polygon.getFillColor());
- }
-
- @Test
- public void testLatLng() {
- Polygon polygon = new PolygonOptions().add(new LatLng(0, 0)).getPolygon();
- assertNotNull("points should not be null", polygon.getPoints());
- assertEquals(new LatLng(0, 0), polygon.getPoints().get(0));
- }
-
- @Test
- public void testAddAllLatLng() {
- List<LatLng> coordinates = new ArrayList<>();
- coordinates.add(new LatLng(0, 0));
- Polygon polygon = new PolygonOptions().addAll(coordinates).getPolygon();
- assertNotNull(polygon.getPoints());
- assertEquals(new LatLng(0, 0), polygon.getPoints().get(0));
- }
-
- @Test
- public void testBuilder() {
- PolylineOptions polylineOptions = new PolylineOptions();
- polylineOptions.width(1.0f);
- polylineOptions.color(2);
- polylineOptions.add(new LatLng(0, 0));
-
- Polyline polyline = polylineOptions.getPolyline();
- assertEquals(1.0f, polyline.getWidth(), 0);
- assertEquals(2, polyline.getColor());
- assertNotNull("Points should not be null", polyline.getPoints());
- assertEquals(new LatLng(0, 0), polyline.getPoints().get(0));
- }
-
-}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolylineTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolylineTest.java
deleted file mode 100644
index 78af961e02..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/PolylineTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.mapbox.mapboxsdk.maps;
-
-import com.mapbox.mapboxsdk.annotations.Polyline;
-import com.mapbox.mapboxsdk.annotations.PolylineOptions;
-import com.mapbox.mapboxsdk.geometry.LatLng;
-
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class PolylineTest {
-
- @Test
- public void testSanity() {
- PolylineOptions polylineOptions = new PolylineOptions();
- assertNotNull("polylineOptions should not be null", polylineOptions);
- }
-
- @Test
- public void testPolyline() {
- Polyline polyline = new PolylineOptions().getPolyline();
- assertNotNull("polyline should not be null", polyline);
- }
-
- @Test
- public void testAlpha() {
- Polyline polyline = new PolylineOptions().alpha(0.2f).getPolyline();
- assertEquals(0.2f, polyline.getAlpha(), 0.0f);
- }
-
- @Test
- public void testWidth() {
- Polyline polyline = new PolylineOptions().width(1).getPolyline();
- assertEquals(1.0f, polyline.getWidth(), 0);
- }
-
- @Test
- public void testColor() {
- Polyline polyline = new PolylineOptions().color(1).getPolyline();
- assertEquals(1, polyline.getColor());
- }
-
- @Test
- public void testAddLatLng() {
- Polyline polyline = new PolylineOptions().add(new LatLng(0, 0)).getPolyline();
- assertNotNull("Points should not be null", polyline.getPoints());
- assertEquals(new LatLng(0, 0), polyline.getPoints().get(0));
- }
-
- @Test
- public void testAddAllLatLng() {
- List<LatLng> coordinates = new ArrayList<>();
- coordinates.add(new LatLng(0, 0));
- Polyline polyline = new PolylineOptions().addAll(coordinates).getPolyline();
- assertNotNull(polyline.getPoints());
- assertEquals(new LatLng(0, 0), polyline.getPoints().get(0));
- }
-
- @Test
- public void testBuilder() {
- PolylineOptions polylineOptions = new PolylineOptions();
- polylineOptions.width(1.0f);
- polylineOptions.color(2);
- polylineOptions.add(new LatLng(0, 0));
-
- Polyline polyline = polylineOptions.getPolyline();
- assertEquals(1.0f, polyline.getWidth(), 0);
- assertEquals(2, polyline.getColor());
- assertNotNull("Points should not be null", polyline.getPoints());
- assertEquals(new LatLng(0, 0), polyline.getPoints().get(0));
- }
-
-}