use of android.os.Parcelable in project mortar by square.
the class PopupPresenterTest method showTwiceWithSameInfoDebounces.
@Test
public void showTwiceWithSameInfoDebounces() {
presenter.takeView(view);
Parcelable info = mock(Parcelable.class);
presenter.show(info);
presenter.show(info);
verify(view).show(same(info), anyBoolean(), same(presenter));
}
use of android.os.Parcelable in project mortar by square.
the class PopupPresenterTest method showingReturnsInfo.
@Test
public void showingReturnsInfo() {
Parcelable info = mock(Parcelable.class);
presenter.show(info);
assertThat(presenter.showing()).isSameAs(info);
}
use of android.os.Parcelable in project mortar by square.
the class PopupPresenterTest method showAfterTakeViewShowsView.
@Test
public void showAfterTakeViewShowsView() {
presenter.takeView(view);
Parcelable info = mock(Parcelable.class);
presenter.show(info);
verify(view).show(same(info), eq(WITH_FLOURISH), same(presenter));
}
use of android.os.Parcelable in project robolectric by robolectric.
the class ShadowBundleTest method parcelableArray.
@Test
public void parcelableArray() {
Bundle innerBundle = new Bundle();
innerBundle.putInt("value", 1);
Parcelable[] arr = new Parcelable[] { innerBundle };
bundle.putParcelableArray("foo", arr);
assertThat(bundle.getParcelableArray("foo")).isEqualTo(arr);
assertThat(bundle.getParcelableArray("bar")).isNull();
}
use of android.os.Parcelable in project material by rey5137.
the class WeekView method onSaveInstanceState.
@Override
protected Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.selected = 0;
int mask = 1;
for (int i = Calendar.SUNDAY; i <= Calendar.SATURDAY; i++) {
if (isSelected(i))
ss.selected += mask;
mask <<= 1;
}
return ss;
}
Aggregations