@Test(expected = IllegalArgumentException.class) public void testSetRouteWithNullManeuverListException() { Route route = mock(Route.class); when(route.getManeuvers()).thenReturn(null); mManeuverList.setRoute(route); }
public void setRoute(final Route route) { if (route == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_exception_route_null)); } mRoute = route; final List<Maneuver> maneuvers = mRoute.getManeuvers(); if (maneuvers == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_no_maneuver_found)); } mManeuverList.clear(); mManeuverList.addAll(maneuvers); mAdapter.notifyDataSetChanged(); }
ManeuverList extends CustomRecyclerView { public void setRoute(final Route route) { if (route == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_exception_route_null)); } mRoute = route; final List<Maneuver> maneuvers = mRoute.getManeuvers(); if (maneuvers == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_no_maneuver_found)); } mManeuverList.clear(); mManeuverList.addAll(maneuvers); mAdapter.notifyDataSetChanged(); } }
ManeuverList extends CustomRecyclerView { public void setRoute(final Route route) { if (route == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_exception_route_null)); } mRoute = route; final List<Maneuver> maneuvers = mRoute.getManeuvers(); if (maneuvers == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_no_maneuver_found)); } mManeuverList.clear(); mManeuverList.addAll(maneuvers); mAdapter.notifyDataSetChanged(); } ManeuverList(final Context context);  ManeuverList(final Context context, final AttributeSet attrs);  ManeuverList(final Context context, final AttributeSet attrs, final int defStyleAttr); }
ManeuverList extends CustomRecyclerView { public void setRoute(final Route route) { if (route == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_exception_route_null)); } mRoute = route; final List<Maneuver> maneuvers = mRoute.getManeuvers(); if (maneuvers == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_no_maneuver_found)); } mManeuverList.clear(); mManeuverList.addAll(maneuvers); mAdapter.notifyDataSetChanged(); } ManeuverList(final Context context);  ManeuverList(final Context context, final AttributeSet attrs);  ManeuverList(final Context context, final AttributeSet attrs, final int defStyleAttr); void setUnitSystem(UnitSystem unitSystem); UnitSystem getUnitSystem(); Route getRoute(); void setRoute(final Route route); }
ManeuverList extends CustomRecyclerView { public void setRoute(final Route route) { if (route == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_exception_route_null)); } mRoute = route; final List<Maneuver> maneuvers = mRoute.getManeuvers(); if (maneuvers == null) { throw new IllegalArgumentException(getContext().getString(R.string.msdkui_no_maneuver_found)); } mManeuverList.clear(); mManeuverList.addAll(maneuvers); mAdapter.notifyDataSetChanged(); } ManeuverList(final Context context);  ManeuverList(final Context context, final AttributeSet attrs);  ManeuverList(final Context context, final AttributeSet attrs, final int defStyleAttr); void setUnitSystem(UnitSystem unitSystem); UnitSystem getUnitSystem(); Route getRoute(); void setRoute(final Route route);  }