org.assertj.android.api.widget.TableLayoutAssert 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!
package org.assertj.android.api.widget;
import android.widget.TableLayout;
import static org.assertj.core.api.Assertions.assertThat;
public class TableLayoutAssert extends AbstractLinearLayoutAssert {
public TableLayoutAssert(TableLayout actual) {
super(actual, TableLayoutAssert.class);
}
public TableLayoutAssert isCollapsedColumn(int index) {
isNotNull();
assertThat(actual.isColumnCollapsed(index)) //
.overridingErrorMessage("Expected column %s to be collapsed but was not.", index) //
.isTrue();
return this;
}
public TableLayoutAssert isNotCollapsedColumn(int index) {
isNotNull();
assertThat(actual.isColumnCollapsed(index)) //
.overridingErrorMessage("Expected column %s to not be collapsed but was.", index) //
.isFalse();
return this;
}
public TableLayoutAssert isShrinkableColumn(int index) {
isNotNull();
assertThat(actual.isColumnShrinkable(index)) //
.overridingErrorMessage("Expected column %s to be shrinkable but was not.", index) //
.isTrue();
return this;
}
public TableLayoutAssert isNotShrinkableColumn(int index) {
isNotNull();
assertThat(actual.isColumnShrinkable(index)) //
.overridingErrorMessage("Expected column %s to not be shrinkable but was.", index) //
.isFalse();
return this;
}
public TableLayoutAssert isStretchableColumn(int index) {
isNotNull();
assertThat(actual.isColumnStretchable(index)) //
.overridingErrorMessage("Expected column %s to be stretchable but was not.") //
.isTrue();
return this;
}
public TableLayoutAssert isNotStretchableColumn(int index) {
isNotNull();
assertThat(actual.isColumnStretchable(index)) //
.overridingErrorMessage("Expected column %s to not be stretchable but was.") //
.isFalse();
return this;
}
}