@Test public void deleteWhenEmpty_fromPostalCode_shiftsToCvc() { mCardMultilineWidget.setCardInputListener(mFullCardListener); mFullGroup.cardNumberEditText.setText(VALID_DINERS_CLUB_WITH_SPACES); mFullGroup.expiryDateEditText.append("12"); mFullGroup.expiryDateEditText.append("50"); mFullGroup.cvcEditText.append("123"); reset(mFullCardListener); ViewTestUtils.sendDeleteKeyEvent(mFullGroup.postalCodeEditText); verify(mFullCardListener, times(1)).onFocusChange(FOCUS_CVC); assertEquals("12", mFullGroup.cvcEditText.getText().toString()); }
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);  }