[android] #4475 - Introducing LatLng.wrap() and removing usage of wrap() in JNI's nativeLatLngForPixel()

This commit is contained in:
Brad Leege
2016-03-25 15:34:43 -05:00
parent 8cdb4f74e1
commit 335e346ed1
4 changed files with 41 additions and 5 deletions

View File

@@ -2,19 +2,17 @@ package com.mapbox.mapboxsdk.geometry;
import android.location.Location;
import android.os.Parcel;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.utils.MockParcel;
import org.junit.Test;
import java.util.Objects;
import dalvik.annotation.TestTargetClass;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -202,4 +200,11 @@ public class LatLngTest {
assertEquals("contents should be 0", 0, latLng.describeContents(), DELTA);
}
@Test
public void testWrapped() {
LatLng latLng = new LatLng(45.0, -185.0);
LatLng wrapped = latLng.wrap();
assertTrue(!latLng.equals(wrapped));
assertTrue(wrapped.getLongitude() == 175.0);
}
}