2121import org .json .JSONObject ;
2222import org .junit .After ;
2323import org .junit .Before ;
24- import org .junit .Ignore ;
2524import org .junit .Test ;
2625import org .junit .runner .RunWith ;
2726import org .mockito .Mockito ;
6665import static org .junit .Assert .fail ;
6766import static org .mockito .Mockito .mock ;
6867
68+ /**
69+ *
70+ *
71+ * Created by Ephraim Kigamba - ekigamba@ona.io on 05/12/2017.
72+ */
6973@ RunWith (RobolectricTestRunner .class )
7074@ Config (manifest = Config .NONE ,
7175 shadows = {
@@ -85,7 +89,7 @@ public class MapboxOfflineDownloaderServiceTest {
8589 private Context context ;
8690 private MapboxOfflineDownloaderService mapboxOfflineDownloaderService ;
8791
88- private final String sampleValidMapboxStyleURL = "mapbox://styles/ona/90kiosdcIJ3d" ;
92+ private String sampleValidMapboxStyleURL = "mapbox://styles/ona/90kiosdcIJ3d" ;
8993 private String mapboxAccessToken ;
9094 private float minZoom = 22 ;
9195 private float maxZoom = 10 ;
@@ -241,19 +245,16 @@ public void persistOfflineMapTaskShouldSaveQueueTaskWhenGivenValidDownloadTask()
241245 }
242246
243247 @ Test
244- @ Ignore ("Hanging on CI" )
245248 public void sendBroadcastShouldProduceValidIntentWhenGivenDownloadUpdate () {
246249 assertValidBroadcastCreatedWhenSendBroadcastIsCalled (MapboxOfflineDownloaderService .SERVICE_ACTION_RESULT .SUCCESSFUL , mapName , "9.0%" , MapboxOfflineDownloaderService .SERVICE_ACTION .DOWNLOAD_MAP );
247250 }
248251
249252 @ Test
250- @ Ignore ("Hanging on CI" )
251253 public void sendBroadcast2ShouldProduceValidIntentWhenGivenDownloadUpdate () {
252254 assertValidBroadcastCreatedWhenSendBroadcast2IsCalled (MapboxOfflineDownloaderService .SERVICE_ACTION_RESULT .SUCCESSFUL , mapName , MapboxOfflineDownloaderService .SERVICE_ACTION .DELETE_MAP );
253255 }
254256
255257 @ Test
256- @ Ignore ("Hanging on CI" )
257258 public void mapboxTileLimitExceededShouldCreateValidBroadcast () throws InterruptedException , NoSuchFieldException , IllegalAccessException {
258259 latch = new CountDownLatch (1 );
259260
@@ -269,7 +270,6 @@ public void mapboxTileLimitExceededShouldCreateValidBroadcast() throws Interrupt
269270 }
270271
271272 @ Test
272- @ Ignore ("Failing : To Do Fix" )
273273 public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndMessage () throws NoSuchFieldException , IllegalAccessException {
274274 latch = new CountDownLatch (1 );
275275
@@ -286,7 +286,6 @@ public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndMessage()
286286 }
287287
288288 @ Test
289- @ Ignore ("Hanging on CI" )
290289 public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndEmptyMessage () throws NoSuchFieldException , IllegalAccessException , InterruptedException {
291290 latch = new CountDownLatch (1 );
292291
@@ -304,7 +303,6 @@ public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndEmptyMess
304303 }
305304
306305 @ Test
307- @ Ignore ("Hanging on CI" )
308306 public void onStatusChangedShouldShowProgressNotificationWhenGivenIncompleteOfflineRegionStatus () throws NoSuchFieldException , IllegalAccessException , InterruptedException , NoSuchMethodException , InvocationTargetException {
309307 latch = new CountDownLatch (1 );
310308 OfflineRegionStatus incompleteOfflineRegionStatus = createOfflineRegion (OfflineRegion .STATE_ACTIVE , 200 , 98923 , 898 , 230909 , 300 , true , false );
@@ -427,7 +425,6 @@ public void getTaskStatusShouldUpdateCurrentDownloadMapNameWhenGivenValidDeleteQ
427425 }
428426
429427 @ Test
430- @ Ignore ("Hanging on CI" )
431428 public synchronized void onStatusChangedShouldShowDownloadCompleteNotificationWhenGivenCompletedOfflineRegion () throws Throwable {
432429 latch = new CountDownLatch (1 );
433430 OfflineRegionStatus completeOfflineRegionStatus = createOfflineRegion (OfflineRegion .STATE_ACTIVE , 300 , 98923 , 898 , 230909 , 300 , true , true );
0 commit comments