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

org.fest.assertions.api.android.preference.EditTextPreferenceAssert Maven / Gradle / Ivy

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

import android.preference.EditTextPreference;

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

/** Assertions for {@link EditTextPreference} instances. */
public class EditTextPreferenceAssert
    extends AbstractDialogPreferenceAssert {
  public EditTextPreferenceAssert(EditTextPreference actual) {
    super(actual, EditTextPreferenceAssert.class);
  }

  public EditTextPreferenceAssert hasText(String text) {
    isNotNull();
    String actualText = actual.getText();
    assertThat(actualText) //
        .overridingErrorMessage("Expected text <%s> but was <%s>.", text, actualText) //
        .isEqualTo(text);
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy