org.assertj.android.api.animation.AnimatorSetAssert 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.animation;
import android.animation.AnimatorSet;
import android.annotation.TargetApi;
import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static org.assertj.core.api.Assertions.assertThat;
@TargetApi(HONEYCOMB)
public class AnimatorSetAssert extends AbstractAnimatorAssert {
public AnimatorSetAssert(AnimatorSet actual) {
super(actual, AnimatorSetAssert.class);
}
public AnimatorSetAssert hasAnimatorCount(int count) {
isNotNull();
int actualCount = actual.getChildAnimations().size();
assertThat(actualCount) //
.overridingErrorMessage("Expected animator count <%s> but was <%s>.", count, actualCount) //
.isEqualTo(count);
return myself;
}
}