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

org.assertj.android.api.preference.EditTextPreferenceAssert Maven / Gradle / Ivy

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

import android.preference.EditTextPreference;

import static org.assertj.core.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