@Test public void whenDuration_thenDurationSet() { createBuilder(); builderUnderTest.duration(Toast.LENGTH_LONG); assertThat(builderUnderTest.duration).isEqualTo(Toast.LENGTH_LONG); }
public ToastBuilder duration(int duration) { this.duration = duration; return this; }
ToastBuilder { public ToastBuilder duration(int duration) { this.duration = duration; return this; } }
ToastBuilder { public ToastBuilder duration(int duration) { this.duration = duration; return this; } ToastBuilder(Context context); }
ToastBuilder { public ToastBuilder duration(int duration) { this.duration = duration; return this; } ToastBuilder(Context context); ToastBuilder customView(View customView); ToastBuilder customViewMessageViewId(int customViewMessageViewId); ToastBuilder message(CharSequence message); ToastBuilder message(@StringRes int messageResId); ToastBuilder messageTextColor(@ColorInt int messageTextColor); ToastBuilder messageTextColorRes(@ColorRes int messageTextColorResId); ToastBuilder duration(int duration); ToastBuilder gravity(int gravity); ToastBuilder gravityOffsetX(int gravityOffsetX); ToastBuilder gravityOffsetY(int gravityOffsetY); @SuppressLint("ShowToast") Toast build(); }
ToastBuilder { public ToastBuilder duration(int duration) { this.duration = duration; return this; } ToastBuilder(Context context); ToastBuilder customView(View customView); ToastBuilder customViewMessageViewId(int customViewMessageViewId); ToastBuilder message(CharSequence message); ToastBuilder message(@StringRes int messageResId); ToastBuilder messageTextColor(@ColorInt int messageTextColor); ToastBuilder messageTextColorRes(@ColorRes int messageTextColorResId); ToastBuilder duration(int duration); ToastBuilder gravity(int gravity); ToastBuilder gravityOffsetX(int gravityOffsetX); ToastBuilder gravityOffsetY(int gravityOffsetY); @SuppressLint("ShowToast") Toast build();  }