org.assertj.android.api.widget.AbstractAbsSpinnerAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of assertj-android Show documentation
Show all versions of assertj-android Show documentation
A set of AssertJ assertion helpers geared toward testing Android.
// Copyright 2013 Square, Inc.
package org.assertj.android.api.widget;
import android.widget.AbsSpinner;
import android.widget.SpinnerAdapter;
import org.assertj.core.api.Assertions;
public abstract class AbstractAbsSpinnerAssert, A extends AbsSpinner>
extends AbstractAdapterViewAssert {
protected AbstractAbsSpinnerAssert(A actual, Class selfType) {
super(actual, selfType);
}
public S hasAdapter(SpinnerAdapter adapter) {
isNotNull();
SpinnerAdapter actualAdapter = actual.getAdapter();
Assertions.assertThat(actualAdapter) //
.overridingErrorMessage("Expected adapter <%s> but was <%s>.", adapter, actualAdapter) //
.isSameAs(adapter);
return myself;
}
}