diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/annotations/AnnotationTest.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/annotations/AnnotationTest.java | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/annotations/AnnotationTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/annotations/AnnotationTest.java index 76658c242f..611e4f978c 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/annotations/AnnotationTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/annotations/AnnotationTest.java @@ -17,75 +17,75 @@ import static org.mockito.Mockito.verify; public class AnnotationTest { - @InjectMocks - private MapboxMap mapboxMap = mock(MapboxMap.class); - private Annotation annotation; - private Annotation compare = new Annotation() { - @Override - public long getId() { - return 1; - } - }; - - @Before - public void beforeTest() { - annotation = new Annotation() { - // empty child - }; + @InjectMocks + private MapboxMap mapboxMap = mock(MapboxMap.class); + private Annotation annotation; + private Annotation compare = new Annotation() { + @Override + public long getId() { + return 1; } + }; - @Test - public void testSanity() { - assertNotNull("markerOptions should not be null", annotation); - } + @Before + public void beforeTest() { + annotation = new Annotation() { + // empty child + }; + } - @Test - public void testRemove() { - annotation.setId(1); - annotation.setMapboxMap(mapboxMap); - annotation.remove(); - verify(mapboxMap, times(1)).removeAnnotation(annotation); - } + @Test + public void testSanity() { + assertNotNull("markerOptions should not be null", annotation); + } - @Test - public void testRemoveUnboundMapboxMap() { - annotation.setId(1); - annotation.remove(); - verify(mapboxMap, times(0)).removeAnnotation(annotation); - } + @Test + public void testRemove() { + annotation.setId(1); + annotation.setMapboxMap(mapboxMap); + annotation.remove(); + verify(mapboxMap, times(1)).removeAnnotation(annotation); + } - @Test - public void testCompareToEqual() { - annotation.setId(1); - assertEquals("conparable equal", 0, annotation.compareTo(compare)); - } + @Test + public void testRemoveUnboundMapboxMap() { + annotation.setId(1); + annotation.remove(); + verify(mapboxMap, times(0)).removeAnnotation(annotation); + } - @Test - public void testCompareToHigher() { - annotation.setId(3); - assertEquals("conparable higher", -1, annotation.compareTo(compare)); - } + @Test + public void testCompareToEqual() { + annotation.setId(1); + assertEquals("conparable equal", 0, annotation.compareTo(compare)); + } - @Test - public void testCompareTolower() { - annotation.setId(0); - assertEquals("conparable lower", 1, annotation.compareTo(compare)); - } + @Test + public void testCompareToHigher() { + annotation.setId(3); + assertEquals("conparable higher", -1, annotation.compareTo(compare)); + } - @Test - public void testEquals() { - Annotation holder = null; - assertFalse(annotation.equals(holder)); - holder = annotation; - assertTrue(annotation.equals(holder)); - assertFalse(annotation.equals(new Object())); - } + @Test + public void testCompareTolower() { + annotation.setId(0); + assertEquals("conparable lower", 1, annotation.compareTo(compare)); + } - @Test - public void testHashcode() { - int id = 1; - annotation.setId(id); - assertSame("hashcode should match", annotation.hashCode(), id); - } + @Test + public void testEquals() { + Annotation holder = null; + assertFalse(annotation.equals(holder)); + holder = annotation; + assertTrue(annotation.equals(holder)); + assertFalse(annotation.equals(new Object())); + } + + @Test + public void testHashcode() { + int id = 1; + annotation.setId(id); + assertSame("hashcode should match", annotation.hashCode(), id); + } }
\ No newline at end of file |