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

org.fest.assertions.api.android.widget.ViewSwitcherAssert 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.view.View;
import android.widget.ViewSwitcher;

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

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

  public ViewSwitcherAssert hasNextView(View view) {
    isNotNull();
    View actualView = actual.getNextView();
    assertThat(actualView) //
        .overridingErrorMessage("Expected next view <%s> but was <%s>.", view, actualView) //
        .isSameAs(view);
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy