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

org.fest.assertions.api.android.widget.ViewFlipperAssert 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.ViewFlipper;

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

/** Assertions for {@link ViewFlipper} instances. */
public class ViewFlipperAssert extends AbstractViewAnimatorAssert {
  public ViewFlipperAssert(ViewFlipper actual) {
    super(actual, ViewFlipperAssert.class);
  }

  public ViewFlipperAssert isAutoStarting() {
    isNotNull();
    assertThat(actual.isAutoStart()) //
        .overridingErrorMessage("Expected to be auto-starting but was not.") //
        .isTrue();
    return this;
  }

  public ViewFlipperAssert isNotAutoStarting() {
    isNotNull();
    assertThat(actual.isAutoStart()) //
        .overridingErrorMessage("Expected to not be auto-starting but was.") //
        .isTrue();
    return this;
  }

  public ViewFlipperAssert isFlipping() {
    isNotNull();
    assertThat(actual.isFlipping()) //
        .overridingErrorMessage("Expected to be flipping but was not.") //
        .isTrue();
    return this;
  }

  public ViewFlipperAssert isNotFlipping() {
    isNotNull();
    assertThat(actual.isFlipping()) //
        .overridingErrorMessage("Expected to not be flipping but was.") //
        .isFalse();
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy