org.fest.assertions.api.android.widget.ViewFlipperAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fest-android Show documentation
Show all versions of fest-android Show documentation
A set of FEST assertion helpers geared toward testing Android.
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.widget;
import android.widget.ViewFlipper;
import static org.fest.assertions.api.Assertions.assertThat;
/** Assertions for {@link ViewFlipper} instances. */
public class ViewFlipperAssert extends AbstractViewAnimatorAssert {
public ViewFlipperAssert(ViewFlipper actual) {
super(actual, ViewFlipperAssert.class);
}
public ViewFlipperAssert isAutoStarting() {
isNotNull();
assertThat(actual.isAutoStart()) //
.overridingErrorMessage("Expected to be auto-starting but was not.") //
.isTrue();
return this;
}
public ViewFlipperAssert isNotAutoStarting() {
isNotNull();
assertThat(actual.isAutoStart()) //
.overridingErrorMessage("Expected to not be auto-starting but was.") //
.isTrue();
return this;
}
public ViewFlipperAssert isFlipping() {
isNotNull();
assertThat(actual.isFlipping()) //
.overridingErrorMessage("Expected to be flipping but was not.") //
.isTrue();
return this;
}
public ViewFlipperAssert isNotFlipping() {
isNotNull();
assertThat(actual.isFlipping()) //
.overridingErrorMessage("Expected to not be flipping but was.") //
.isFalse();
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy