@Test public void afterAddingFinalDigit_whenGoingFromInvalidToValid_callsListener() { if (Calendar.getInstance().get(Calendar.YEAR) > 2059) { fail("Update the code with a date that is still valid. Also, hello from the past."); } mExpiryDateEditText.append("1"); mExpiryDateEditText.append("2"); mExpiryDateEditText.append("5"); verifyZeroInteractions(mExpiryDateEditListener); mExpiryDateEditText.append("9"); assertTrue(mExpiryDateEditText.isDateValid()); verify(mExpiryDateEditListener, times(1)).onExpiryDateComplete(); }
public boolean isDateValid() { return mIsDateValid; }
ExpiryDateEditText extends StripeEditText { public boolean isDateValid() { return mIsDateValid; } }
ExpiryDateEditText extends StripeEditText { public boolean isDateValid() { return mIsDateValid; } ExpiryDateEditText(Context context);  ExpiryDateEditText(Context context, AttributeSet attrs);  ExpiryDateEditText(Context context, AttributeSet attrs, int defStyleAttr); }
ExpiryDateEditText extends StripeEditText { public boolean isDateValid() { return mIsDateValid; } ExpiryDateEditText(Context context);  ExpiryDateEditText(Context context, AttributeSet attrs);  ExpiryDateEditText(Context context, AttributeSet attrs, int defStyleAttr); boolean isDateValid(); @Nullable @Size(2) int[] getValidDateFields(); void setExpiryDateEditListener(ExpiryDateEditListener expiryDateEditListener); }
ExpiryDateEditText extends StripeEditText { public boolean isDateValid() { return mIsDateValid; } ExpiryDateEditText(Context context);  ExpiryDateEditText(Context context, AttributeSet attrs);  ExpiryDateEditText(Context context, AttributeSet attrs, int defStyleAttr); boolean isDateValid(); @Nullable @Size(2) int[] getValidDateFields(); void setExpiryDateEditListener(ExpiryDateEditListener expiryDateEditListener);  }