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

org.assertj.android.api.app.AbstractDialogAssert Maven / Gradle / Ivy

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

import android.app.Dialog;
import org.assertj.core.api.AbstractAssert;

import static org.assertj.core.api.Assertions.assertThat;

public abstract class AbstractDialogAssert, A extends Dialog>
    extends AbstractAssert {
  public AbstractDialogAssert(A actual, Class selfType) {
    super(actual, selfType);
  }

  public S isShowing() {
    isNotNull();
    assertThat(actual.isShowing()) //
        .overridingErrorMessage("Expected showing but was not showing") //
        .isTrue();
    return myself;
  }

  public S isNotShowing() {
    isNotNull();
    assertThat(actual.isShowing()) //
        .overridingErrorMessage("Expected not showing but was showing") //
        .isFalse();
    return myself;
  }
}