org.fest.assertions.api.android.view.ViewPropertyAnimatorAssert 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.
package org.fest.assertions.api.android.view;
import android.view.ViewPropertyAnimator;
import org.fest.assertions.api.AbstractAssert;
import static org.fest.assertions.api.Assertions.assertThat;
/** Assertions for {@link ViewPropertyAnimator} instances. */
public class ViewPropertyAnimatorAssert
extends AbstractAssert {
public ViewPropertyAnimatorAssert(ViewPropertyAnimator actual) {
super(actual, ViewPropertyAnimatorAssert.class);
}
public ViewPropertyAnimatorAssert hasDuration(long duration) {
isNotNull();
long actualDuration = actual.getDuration();
assertThat(actualDuration) //
.overridingErrorMessage("Expected duration <%s> but was <%s>", duration, actualDuration) //
.isEqualTo(duration);
return this;
}
public ViewPropertyAnimatorAssert hasStartDelay(long delay) {
isNotNull();
long actualDelay = actual.getStartDelay();
assertThat(actualDelay) //
.overridingErrorMessage("Expected start delay <%s> but was <%s>", delay, actualDelay) //
.isEqualTo(delay);
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy