org.assertj.android.api.widget.ViewSwitcherAssert 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.
The newest version!
// Copyright 2013 Square, Inc.
package org.assertj.android.api.widget;
import android.view.View;
import android.widget.ViewSwitcher;
import static org.assertj.core.api.Assertions.assertThat;
/** Assertions for {@link ViewSwitcher} instances. */
public class ViewSwitcherAssert
extends AbstractViewAnimatorAssert {
public ViewSwitcherAssert(ViewSwitcher actual) {
super(actual, ViewSwitcherAssert.class);
}
public ViewSwitcherAssert hasNextView(View view) {
isNotNull();
View actualView = actual.getNextView();
assertThat(actualView) //
.overridingErrorMessage("Expected next view <%s> but was <%s>.", view, actualView) //
.isSameAs(view);
return this;
}
}