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

org.assertj.android.api.view.TextureViewAssert Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package org.assertj.android.api.view;

import android.annotation.TargetApi;
import android.view.TextureView;

import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import static org.assertj.core.api.Assertions.assertThat;

/** Assertions for {@link TextureView} instances. */
@TargetApi(ICE_CREAM_SANDWICH)
public class TextureViewAssert extends AbstractViewAssert {
  public TextureViewAssert(TextureView actual) {
    super(actual, TextureViewAssert.class);
  }

  public TextureViewAssert isAvailable() {
    isNotNull();
    assertThat(actual.isAvailable()) //
        .overridingErrorMessage("Expected to be available but was not available.") //
        .isTrue();
    return this;
  }

  public TextureViewAssert isNotAvailable() {
    isNotNull();
    assertThat(actual.isAvailable()) //
        .overridingErrorMessage("Expected to not be available but was available.") //
        .isFalse();
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy