@Test public void testUIWhenDataIsInvalid() { final TextView eta = mEstimatedArrivalView.findViewById(R.id.eta); final TextView distance = mEstimatedArrivalView.findViewById(R.id.distance); final TextView duration = mEstimatedArrivalView.findViewById(R.id.duration); GuidanceEstimatedArrivalViewData data = new GuidanceEstimatedArrivalViewData(null, null, null); mEstimatedArrivalView.setEstimatedArrivalData(data); assertEquals(eta.getVisibility(), View.VISIBLE); assertEquals(distance.getVisibility(), View.VISIBLE); assertEquals(duration.getVisibility(), View.VISIBLE); assertThat(eta.getText().toString(), is(getString(R.string.msdkui_value_not_available))); assertThat(distance.getText().toString(), is(getString(R.string.msdkui_value_not_available))); assertThat(duration.getText().toString(), is(getString(R.string.msdkui_value_not_available))); }
public void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data) { mData = data; populate(data); }
GuidanceEstimatedArrivalView extends BaseView { public void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data) { mData = data; populate(data); } }
GuidanceEstimatedArrivalView extends BaseView { public void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data) { mData = data; populate(data); } GuidanceEstimatedArrivalView(Context context);  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs);  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
                                        int defStyleRes); }
GuidanceEstimatedArrivalView extends BaseView { public void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data) { mData = data; populate(data); } GuidanceEstimatedArrivalView(Context context);  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs);  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
                                        int defStyleRes); @Nullable GuidanceEstimatedArrivalViewData getEstimatedArrivalData(); void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data); @Override void onRestoreInstanceState(Parcelable state); }
GuidanceEstimatedArrivalView extends BaseView { public void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data) { mData = data; populate(data); } GuidanceEstimatedArrivalView(Context context);  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs);  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceEstimatedArrivalView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
                                        int defStyleRes); @Nullable GuidanceEstimatedArrivalViewData getEstimatedArrivalData(); void setEstimatedArrivalData(@Nullable GuidanceEstimatedArrivalViewData data); @Override void onRestoreInstanceState(Parcelable state);  }