Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - update mock definition of LocationLayerControllerTest, up…
Browse files Browse the repository at this point in the history
…date mockito
  • Loading branch information
tobrun committed Jan 21, 2019
1 parent 3691a2b commit c356675
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,21 @@ private LayerFeatureProvider buildFeatureProvider(Feature feature, @NonNull Loca

private LayerSourceProvider buildLayerProvider() {
LayerSourceProvider layerSourceProvider = mock(LayerSourceProvider.class);
when(layerSourceProvider.generateLayer(SHADOW_LAYER)).thenReturn(mock(Layer.class));
when(layerSourceProvider.generateLayer(BACKGROUND_LAYER)).thenReturn(mock(Layer.class));
when(layerSourceProvider.generateLayer(FOREGROUND_LAYER)).thenReturn(mock(Layer.class));
when(layerSourceProvider.generateLayer(BEARING_LAYER)).thenReturn(mock(Layer.class));
when(layerSourceProvider.generateAccuracyLayer()).thenReturn(mock(Layer.class));

Layer shadowLayer = mock(Layer.class);
when(layerSourceProvider.generateLayer(SHADOW_LAYER)).thenReturn(shadowLayer);

Layer backgroundLayer = mock(Layer.class);
when(layerSourceProvider.generateLayer(BACKGROUND_LAYER)).thenReturn(backgroundLayer);

Layer foregroundLayer = mock(Layer.class);
when(layerSourceProvider.generateLayer(FOREGROUND_LAYER)).thenReturn(foregroundLayer);

Layer bearingLayer = mock(Layer.class);
when(layerSourceProvider.generateLayer(BEARING_LAYER)).thenReturn(bearingLayer);

Layer accuracyLayer = mock(Layer.class);
when(layerSourceProvider.generateAccuracyLayer()).thenReturn(accuracyLayer);
return layerSourceProvider;
}
}
2 changes: 1 addition & 1 deletion platform/android/gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ext {
testRunner : '1.0.2',
leakCanary : '1.6.1',
junit : '4.12',
mockito : '2.18.3',
mockito : '2.23.4',
mockk : '1.8.13.kotlin13',
robolectric : '3.8',
timber : '4.7.1',
Expand Down

0 comments on commit c356675

Please sign in to comment.