@Test public void getCardNumber_whenValidCard_returnsCardNumberWithoutSpaces() { mCardNumberEditText.setText(VALID_VISA_WITH_SPACES); assertEquals(VALID_VISA_NO_SPACES, mCardNumberEditText.getCardNumber()); mCardNumberEditText.setText(VALID_AMEX_WITH_SPACES); assertEquals(VALID_AMEX_NO_SPACES, mCardNumberEditText.getCardNumber()); mCardNumberEditText.setText(VALID_DINERS_CLUB_WITH_SPACES); assertEquals(VALID_DINERS_CLUB_NO_SPACES, mCardNumberEditText.getCardNumber()); }
@Nullable public String getCardNumber() { return mIsCardNumberValid ? StripeTextUtils.removeSpacesAndHyphens(getText().toString()) : null; }
CardNumberEditText extends StripeEditText { @Nullable public String getCardNumber() { return mIsCardNumberValid ? StripeTextUtils.removeSpacesAndHyphens(getText().toString()) : null; } }
CardNumberEditText extends StripeEditText { @Nullable public String getCardNumber() { return mIsCardNumberValid ? StripeTextUtils.removeSpacesAndHyphens(getText().toString()) : null; } CardNumberEditText(Context context);  CardNumberEditText(Context context, AttributeSet attrs);  CardNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); }
CardNumberEditText extends StripeEditText { @Nullable public String getCardNumber() { return mIsCardNumberValid ? StripeTextUtils.removeSpacesAndHyphens(getText().toString()) : null; } 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 { @Nullable public String getCardNumber() { return mIsCardNumberValid ? StripeTextUtils.removeSpacesAndHyphens(getText().toString()) : null; } 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();  }