This Question have no Text answers yet!

Espresso Custom ViewMatcher Mismatch description not appearing in the log

Question!

I have written the following view matcher for my custom view

    public static Matcher<View> withValue(final Matcher<Long> longMatcher){
    return new BoundedMatcher<View, IntegerField>(IntegerField.class) {

        @Override
        public void describeTo(Description description) {
            description.appendText("with value : ");
            longMatcher.describeTo(description);
        }

        @Override
        public void describeMismatch(Object item, Description description) {
            super.describeMismatch(item, description);
            description.appendText("value=" + ((IntegerField)item).getValue());
        }

        @Override
        protected boolean matchesSafely(IntegerField field) {
            return longMatcher.matches(field.getValue());
        }
    };

when the match fails, the log doesn't contain the mismatch description I appended in the descibeMismatch() function. Is there anything that I missed?

By : manidesto


Video about Espresso Custom ViewMatcher Mismatch description not appearing in the log