Created
March 3, 2015 14:37
-
-
Save denyszet/58ec684ca7626dae87e0 to your computer and use it in GitHub Desktop.
Espresso matcher for matching the EditText color.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Matcher<View> withTextColor(final int color) { | |
Checks.checkNotNull(color); | |
return new BoundedMatcher<View, EditText>(EditText.class) { | |
@Override | |
public boolean matchesSafely(EditText warning) { | |
return color == warning.getCurrentTextColor(); | |
} | |
@Override | |
public void describeTo(Description description) { | |
description.appendText("with text color: "); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment