
org.assertj.android.api.graphics.InterpolatorAssert 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.graphics;
import android.graphics.Interpolator;
import org.assertj.core.api.AbstractAssert;
import static org.assertj.core.api.Assertions.assertThat;
/** Assertions for {@link Interpolator} instances. */
public class InterpolatorAssert extends AbstractAssert {
public InterpolatorAssert(Interpolator actual) {
super(actual, InterpolatorAssert.class);
}
public InterpolatorAssert hasKeyFrameCount(int count) {
isNotNull();
int actualCount = actual.getKeyFrameCount();
assertThat(actualCount) //
.overridingErrorMessage("Expected key frame count <%s> but was <%s>.", count, actualCount) //
.isEqualTo(count);
return this;
}
public InterpolatorAssert hasValueCount(int count) {
isNotNull();
int actualCount = actual.getValueCount();
assertThat(actualCount) //
.overridingErrorMessage("Expected value count <%s> but was <%s>.", count, actualCount) //
.isEqualTo(count);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy