@Test public void setText_whenTextChangesFromValidToInvalid_changesCardValidState() { mCardNumberEditText.setText(VALID_VISA_WITH_SPACES); reset(mCardNumberCompleteListener); String mutable = mCardNumberEditText.getText().toString(); mutable = mutable.substring(0, 18); mCardNumberEditText.setText(mutable); assertFalse(mCardNumberEditText.isCardNumberValid()); verifyZeroInteractions(mCardNumberCompleteListener); }
public boolean isCardNumberValid() { return mIsCardNumberValid; }
CardNumberEditText extends StripeEditText { public boolean isCardNumberValid() { return mIsCardNumberValid; } }
CardNumberEditText extends StripeEditText { public boolean isCardNumberValid() { return mIsCardNumberValid; } CardNumberEditText(Context context);  CardNumberEditText(Context context, AttributeSet attrs);  CardNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); }
CardNumberEditText extends StripeEditText { public boolean isCardNumberValid() { return mIsCardNumberValid; } CardNumberEditText(Context context);  CardNumberEditText(Context context, AttributeSet attrs);  CardNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); @NonNull @Card.CardBrand String getCardBrand(); @Nullable String getCardNumber(); int getLengthMax(); boolean isCardNumberValid(); }
CardNumberEditText extends StripeEditText { public boolean isCardNumberValid() { return mIsCardNumberValid; } CardNumberEditText(Context context);  CardNumberEditText(Context context, AttributeSet attrs);  CardNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); @NonNull @Card.CardBrand String getCardBrand(); @Nullable String getCardNumber(); int getLengthMax(); boolean isCardNumberValid();  }