org.fest.assertions.api.android.graphics.drawable.GradientDrawableAssert 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.
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.graphics.drawable;
import android.graphics.drawable.GradientDrawable;
import static org.fest.assertions.api.Assertions.assertThat;
/** Assertions for {@link android.graphics.drawable.GradientDrawable} instances. */
public class GradientDrawableAssert
extends AbstractDrawableAssert {
public GradientDrawableAssert(GradientDrawable actual) {
super(actual, GradientDrawableAssert.class);
}
public GradientDrawableAssert hasOrientation(GradientDrawable.Orientation orientation) {
isNotNull();
GradientDrawable.Orientation actualOrientation = actual.getOrientation();
assertThat(actualOrientation) //
.overridingErrorMessage("Expected orientation <%s> but was <%s>.", orientation,
actualOrientation) //
.isEqualTo(orientation);
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy