@Test public void testGettingRouteOptionsWhenMainItemIsUnselected() { final MockUtils.MockRouteOptionsBuilder builder = new MockUtils.MockRouteOptionsBuilder(); final RouteOptions mockRouteOptions = builder.withFullHazardousOptions() .build(); mHazardousMaterialsOptionsPanel.setRouteOptions(mockRouteOptions); doAnswer(new NoGoodTypesAnswer()).when(mockRouteOptions) .setTruckShippedHazardousGoods(any(EnumSet.class)); mHazardousMaterialsOptionsPanel.getOptionItems(); }
public void setRouteOptions(final RouteOptions routeOptions) { mRouteOptions = routeOptions; final EnumSet<RouteOptions.HazardousGoodType> materialsOptions = mRouteOptions.getTruckShippedHazardousGoods(); select(materialsOptions); }
HazardousMaterialsOptionsPanel extends OptionsPanel implements OptionItem.OnChangedListener { public void setRouteOptions(final RouteOptions routeOptions) { mRouteOptions = routeOptions; final EnumSet<RouteOptions.HazardousGoodType> materialsOptions = mRouteOptions.getTruckShippedHazardousGoods(); select(materialsOptions); } }
HazardousMaterialsOptionsPanel extends OptionsPanel implements OptionItem.OnChangedListener { public void setRouteOptions(final RouteOptions routeOptions) { mRouteOptions = routeOptions; final EnumSet<RouteOptions.HazardousGoodType> materialsOptions = mRouteOptions.getTruckShippedHazardousGoods(); select(materialsOptions); } HazardousMaterialsOptionsPanel(final Context context);  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs);  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr, final int defStyleRes); }
HazardousMaterialsOptionsPanel extends OptionsPanel implements OptionItem.OnChangedListener { public void setRouteOptions(final RouteOptions routeOptions) { mRouteOptions = routeOptions; final EnumSet<RouteOptions.HazardousGoodType> materialsOptions = mRouteOptions.getTruckShippedHazardousGoods(); select(materialsOptions); } HazardousMaterialsOptionsPanel(final Context context);  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs);  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr, final int defStyleRes); RouteOptions getRouteOptions(); void setRouteOptions(final RouteOptions routeOptions); @Override void onChanged(OptionItem item); }
HazardousMaterialsOptionsPanel extends OptionsPanel implements OptionItem.OnChangedListener { public void setRouteOptions(final RouteOptions routeOptions) { mRouteOptions = routeOptions; final EnumSet<RouteOptions.HazardousGoodType> materialsOptions = mRouteOptions.getTruckShippedHazardousGoods(); select(materialsOptions); } HazardousMaterialsOptionsPanel(final Context context);  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs);  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  HazardousMaterialsOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr, final int defStyleRes); RouteOptions getRouteOptions(); void setRouteOptions(final RouteOptions routeOptions); @Override void onChanged(OptionItem item);  }