All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fest.assertions.api.android.graphics.drawable.LayerDrawableAssert Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.graphics.drawable;

import android.graphics.drawable.LayerDrawable;

import static org.fest.assertions.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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy