@Test public void testHandleManeuverEvent() { final Maneuver maneuver = MockUtils.mockManeuver(); GuidanceManeuverListener listener = mock(GuidanceManeuverListener.class); mGuidanceManeuverPresenter.addListener(listener); when(mNavigationManager.getNextManeuver()).thenReturn(maneuver); when(mNavigationManager.getNextManeuverDistance()).thenReturn(200L); mGuidanceManeuverPresenter.handleManeuverEvent(); verify(listener).onDataChanged(any()); }
@Override public void handleManeuverEvent() { final Maneuver maneuver = getNextManeuver(); if (maneuver != null) { if (maneuver.getAction() == Maneuver.Action.END) { updateDestinationManeuverData(maneuver); } else { updateManeuverData(maneuver); } } }
GuidanceManeuverPresenter extends BaseGuidancePresenter { @Override public void handleManeuverEvent() { final Maneuver maneuver = getNextManeuver(); if (maneuver != null) { if (maneuver.getAction() == Maneuver.Action.END) { updateDestinationManeuverData(maneuver); } else { updateManeuverData(maneuver); } } } }
GuidanceManeuverPresenter extends BaseGuidancePresenter { @Override public void handleManeuverEvent() { final Maneuver maneuver = getNextManeuver(); if (maneuver != null) { if (maneuver.getAction() == Maneuver.Action.END) { updateDestinationManeuverData(maneuver); } else { updateManeuverData(maneuver); } } } GuidanceManeuverPresenter(Context context, NavigationManager navigationManager, Route route); }
GuidanceManeuverPresenter extends BaseGuidancePresenter { @Override public void handleManeuverEvent() { final Maneuver maneuver = getNextManeuver(); if (maneuver != null) { if (maneuver.getAction() == Maneuver.Action.END) { updateDestinationManeuverData(maneuver); } else { updateManeuverData(maneuver); } } } GuidanceManeuverPresenter(Context context, NavigationManager navigationManager, Route route); @Override void handlePositionUpdate(); @Override void handleManeuverEvent(); void addListener(GuidanceManeuverListener listener); void removeListener(GuidanceManeuverListener listener); }
GuidanceManeuverPresenter extends BaseGuidancePresenter { @Override public void handleManeuverEvent() { final Maneuver maneuver = getNextManeuver(); if (maneuver != null) { if (maneuver.getAction() == Maneuver.Action.END) { updateDestinationManeuverData(maneuver); } else { updateManeuverData(maneuver); } } } GuidanceManeuverPresenter(Context context, NavigationManager navigationManager, Route route); @Override void handlePositionUpdate(); @Override void handleManeuverEvent(); void addListener(GuidanceManeuverListener listener); void removeListener(GuidanceManeuverListener listener);  }