@Test public void onCompleteCardNumber_whenValid_shiftsFocusToExpiryDate() { mCardMultilineWidget.setCardInputListener(mFullCardListener); mNoZipCardMultilineWidget.setCardInputListener(mNoZipCardListener); mFullGroup.cardNumberEditText.setText(VALID_VISA_WITH_SPACES); verify(mFullCardListener, times(1)).onCardComplete(); verify(mFullCardListener, times(1)).onFocusChange(FOCUS_EXPIRY); assertTrue(mFullGroup.expiryDateEditText.hasFocus()); mNoZipGroup.cardNumberEditText.setText(VALID_AMEX_WITH_SPACES); verify(mNoZipCardListener, times(1)).onCardComplete(); verify(mNoZipCardListener, times(1)).onFocusChange(FOCUS_EXPIRY); assertTrue(mNoZipGroup.expiryDateEditText.hasFocus()); }
public void setCardInputListener(@Nullable CardInputListener cardInputListener) { mCardInputListener = cardInputListener; }
CardMultilineWidget extends LinearLayout { public void setCardInputListener(@Nullable CardInputListener cardInputListener) { mCardInputListener = cardInputListener; } }
CardMultilineWidget extends LinearLayout { public void setCardInputListener(@Nullable CardInputListener cardInputListener) { mCardInputListener = cardInputListener; } CardMultilineWidget(Context context);  CardMultilineWidget(Context context, AttributeSet attrs);  CardMultilineWidget(Context context, AttributeSet attrs, int defStyleAttr); @VisibleForTesting  CardMultilineWidget(Context context, boolean shouldShowPostalCode); }
CardMultilineWidget extends LinearLayout { public void setCardInputListener(@Nullable CardInputListener cardInputListener) { mCardInputListener = cardInputListener; } CardMultilineWidget(Context context);  CardMultilineWidget(Context context, AttributeSet attrs);  CardMultilineWidget(Context context, AttributeSet attrs, int defStyleAttr); @VisibleForTesting  CardMultilineWidget(Context context, boolean shouldShowPostalCode); void clear(); void setCardInputListener(@Nullable CardInputListener cardInputListener); @Nullable Card getCard(); boolean validateAllFields(); @Override void onWindowFocusChanged(boolean hasWindowFocus); void setShouldShowPostalCode(boolean shouldShowPostalCode); @Override boolean isEnabled(); @Override void setEnabled(boolean enabled); }
CardMultilineWidget extends LinearLayout { public void setCardInputListener(@Nullable CardInputListener cardInputListener) { mCardInputListener = cardInputListener; } CardMultilineWidget(Context context);  CardMultilineWidget(Context context, AttributeSet attrs);  CardMultilineWidget(Context context, AttributeSet attrs, int defStyleAttr); @VisibleForTesting  CardMultilineWidget(Context context, boolean shouldShowPostalCode); void clear(); void setCardInputListener(@Nullable CardInputListener cardInputListener); @Nullable Card getCard(); boolean validateAllFields(); @Override void onWindowFocusChanged(boolean hasWindowFocus); void setShouldShowPostalCode(boolean shouldShowPostalCode); @Override boolean isEnabled(); @Override void setEnabled(boolean enabled);  }