org.assertj.android.api.graphics.drawable.LayerDrawableAssert 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.graphics.drawable;
import android.graphics.drawable.LayerDrawable;
import static org.assertj.core.api.Assertions.assertThat;
/** Assertions for {@link LayerDrawable} instances. */
public class LayerDrawableAssert
extends AbstractDrawableAssert {
public LayerDrawableAssert(LayerDrawable actual) {
super(actual, LayerDrawableAssert.class);
}
public LayerDrawableAssert hasLayerCount(int count) {
isNotNull();
int actualCount = actual.getNumberOfLayers();
assertThat(actualCount) //
.overridingErrorMessage("Expected layer count <%s> but was <%s>.", count, actualCount) //
.isEqualTo(count);
return this;
}
}