org.fest.assertions.api.android.preference.EditTextPreferenceAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fest-android Show documentation
Show all versions of fest-android Show documentation
A set of FEST assertion helpers geared toward testing Android.
// 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