org.fest.assertions.api.android.view.AbstractViewGroupLayoutParamsAssert 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.
package org.fest.assertions.api.android.view;
import android.view.ViewGroup;
import org.fest.assertions.api.AbstractAssert;
import static org.fest.assertions.api.Assertions.assertThat;
public abstract class AbstractViewGroupLayoutParamsAssert, A extends ViewGroup.LayoutParams>
extends AbstractAssert {
protected AbstractViewGroupLayoutParamsAssert(A actual, Class selfType) {
super(actual, selfType);
}
public S hasHeight(int height) {
isNotNull();
int actualHeight = actual.height;
assertThat(actualHeight) //
.overridingErrorMessage("Expected height <%s> but was <%s>", height, actualHeight) //
.isEqualTo(height);
return myself;
}
public S hasWidth(int width) {
isNotNull();
int actualWidth = actual.width;
assertThat(actualWidth) //
.overridingErrorMessage("Expected width <%s> but was <%s>", width, actualWidth) //
.isEqualTo(width);
return myself;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy