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

org.fest.assertions.api.android.widget.MediaControllerAssert Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.widget;

import android.widget.MediaController;

import static org.fest.assertions.api.Assertions.assertThat;

/** Assertions for {@link MediaController} instances. */
public class MediaControllerAssert
    extends AbstractFrameLayoutAssert {
  public MediaControllerAssert(MediaController actual) {
    super(actual, MediaControllerAssert.class);
  }

  public MediaControllerAssert isShowing() {
    isNotNull();
    assertThat(actual.isShowing()) //
        .overridingErrorMessage("Expected to be showing but was not.") //
        .isTrue();
    return this;
  }

  public MediaControllerAssert isNotShowing() {
    isNotNull();
    assertThat(actual.isShowing()) //
        .overridingErrorMessage("Expected to not be showing but was.") //
        .isFalse();
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy