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

org.assertj.android.api.widget.TableLayoutAssert Maven / Gradle / Ivy

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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy