-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add divider attribute and adjust divider padding
- Loading branch information
1 parent
a53f870
commit 386c01d
Showing
8 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...i/src/test/java/com/mapbox/services/android/navigation/ui/v5/NavigationPresenterTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.mapbox.services.android.navigation.ui.v5; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.verify; | ||
|
||
public class NavigationPresenterTest { | ||
|
||
@Test | ||
public void onRouteOverviewButtonClick_cameraIsAdjustedToRoute() { | ||
NavigationContract.View view = mock(NavigationContract.View.class); | ||
NavigationPresenter presenter = new NavigationPresenter(view); | ||
|
||
presenter.onRouteOverviewClick(); | ||
|
||
verify(view).updateCameraRouteOverview(); | ||
} | ||
|
||
@Test | ||
public void onRouteOverviewButtonClick_recenterBtnIsShown() { | ||
NavigationContract.View view = mock(NavigationContract.View.class); | ||
NavigationPresenter presenter = new NavigationPresenter(view); | ||
|
||
presenter.onRouteOverviewClick(); | ||
|
||
verify(view).showRecenterBtn(); | ||
} | ||
|
||
@Test | ||
public void onRecenterBtnClick_recenterBtnIsHidden() { | ||
NavigationContract.View view = mock(NavigationContract.View.class); | ||
NavigationPresenter presenter = new NavigationPresenter(view); | ||
|
||
presenter.onRecenterClick(); | ||
|
||
verify(view).hideRecenterBtn(); | ||
} | ||
|
||
@Test | ||
public void onRecenterBtnClick_cameraIsResetToTracking() { | ||
NavigationContract.View view = mock(NavigationContract.View.class); | ||
NavigationPresenter presenter = new NavigationPresenter(view); | ||
|
||
presenter.onRecenterClick(); | ||
|
||
verify(view).resetCameraPosition(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters