diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2015-12-18 12:09:55 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2016-01-05 16:06:34 +0100 |
commit | 522a88560bee66fd2b54b181fab9b3805a15f6e9 (patch) | |
tree | 2ae88c943dbbc43964ddadab4aa3fb9da0e2b74f | |
parent | 0377e23c205decdfd3d9d885af7b0b4078f1448c (diff) | |
download | qtlocation-mapboxgl-522a88560bee66fd2b54b181fab9b3805a15f6e9.tar.gz |
[android] #3308 - remove default constructor
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/BoundingBox.java | 9 | ||||
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/test/java/BoundingBoxTest.java | 18 |
2 files changed, 4 insertions, 23 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/BoundingBox.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/BoundingBox.java index e778e30aad..ca805b38e9 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/BoundingBox.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/BoundingBox.java @@ -57,14 +57,7 @@ public final class BoundingBox implements Parcelable, Serializable { this.mLonWest = other.getLonWest(); this.mIsValid = other.isValid(); } - - /** - * Create a new BoundingBox with no size centered at 0, 0, also known as null island - */ - public BoundingBox() { - this(0, 0, 0, 0); - } - + /** * Calculates the centerpoint of this bounding box by simple interpolation and returns * it as a point. This is a non-geodesic calculation which is not the geographic center. diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/BoundingBoxTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/BoundingBoxTest.java index f03766c9e5..6f6c91234d 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/BoundingBoxTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/BoundingBoxTest.java @@ -5,9 +5,9 @@ import com.mapbox.mapboxsdk.geometry.LatLng; import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -27,12 +27,6 @@ public class BoundingBoxTest { } @Test - public void testDefaultConstructor() { - mBoundingBox = new BoundingBox(0, 0, 0, 0); - assertEquals(mBoundingBox, new BoundingBox()); - } - - @Test public void testEqualityConstructors() { BoundingBox cornerBoundingBox = new BoundingBox(new LatLng(20.0, 10.0), new LatLng(0.0, 0.0)); BoundingBox cloneBoundingBox = new BoundingBox(mBoundingBox); @@ -155,24 +149,18 @@ public class BoundingBoxTest { } @Test - public void testEmptySpanEmptyNotEmptyBox(){ + public void testEmptySpanEmptyNotEmptyBox() { assertFalse(mBoundingBox.isEmpty()); } @Test - public void testEmptySpanEmptyBox() { - mBoundingBox = new BoundingBox(); - assertTrue(mBoundingBox.isEmpty()); - } - - @Test public void testEmptySpanEmptyLatitude() { mBoundingBox = new BoundingBox(1.0, 2.0, 0.0, 2.0); assertTrue(mBoundingBox.isEmpty()); } @Test - public void testEmptySpanEmptyLongitude(){ + public void testEmptySpanEmptyLongitude() { mBoundingBox = new BoundingBox(0.0, 3.0, 0.0, 1.0); assertTrue(mBoundingBox.isEmpty()); } |