From 522a88560bee66fd2b54b181fab9b3805a15f6e9 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Fri, 18 Dec 2015 12:09:55 +0100 Subject: [android] #3308 - remove default constructor --- .../com/mapbox/mapboxsdk/geometry/BoundingBox.java | 9 +-------- .../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; @@ -26,12 +26,6 @@ public class BoundingBoxTest { assertNotNull("boundingBox should not be null", boundingBox); } - @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)); @@ -155,16 +149,10 @@ 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); @@ -172,7 +160,7 @@ public class BoundingBoxTest { } @Test - public void testEmptySpanEmptyLongitude(){ + public void testEmptySpanEmptyLongitude() { mBoundingBox = new BoundingBox(0.0, 3.0, 0.0, 1.0); assertTrue(mBoundingBox.isEmpty()); } -- cgit v1.2.1