/** * @param shippingInformation shippingInformation to populated into the widget input fields. */ public void populateShippingInfo(@Nullable ShippingInformation shippingInformation) { if (shippingInformation == null) { return; } Address address = shippingInformation.getAddress(); if (address != null) { mCityEditText.setText(address.getCity()); if (address.getCountry() != null && !address.getCountry().isEmpty()) { mCountryAutoCompleteTextView.setCountrySelected(address.getCountry()); } mAddressEditText.setText(address.getLine1()); mAddressEditText2.setText(address.getLine2()); mPostalCodeEditText.setText(address.getPostalCode()); mStateEditText.setText(address.getState()); } mNameEditText.setText(shippingInformation.getName()); mPhoneNumberEditText.setText(shippingInformation.getPhone()); }
assertTrue(sepaDebitSource.getSourceTypeModel() instanceof SourceSepaDebitData); assertEquals("eur", sepaDebitSource.getCurrency()); assertEquals("Eureka", sepaDebitSource.getOwner().getAddress().getCity()); assertEquals("90210", sepaDebitSource.getOwner().getAddress().getPostalCode()); assertEquals("EI", sepaDebitSource.getOwner().getAddress().getCountry());
assertTrue(sepaDebitSource.getSourceTypeModel() instanceof SourceSepaDebitData); assertEquals("eur", sepaDebitSource.getCurrency()); assertEquals("Eureka", sepaDebitSource.getOwner().getAddress().getCity()); assertEquals("90210", sepaDebitSource.getOwner().getAddress().getPostalCode()); assertEquals("123 Main St", sepaDebitSource.getOwner().getAddress().getLine1());
assertTrue(sepaDebitSource.getSourceTypeModel() instanceof SourceSepaDebitData); assertEquals("eur", sepaDebitSource.getCurrency()); assertEquals("Eureka", sepaDebitSource.getOwner().getAddress().getCity()); assertEquals("90210", sepaDebitSource.getOwner().getAddress().getPostalCode()); assertEquals("123 Main St", sepaDebitSource.getOwner().getAddress().getLine1());
assertNotNull(cardSource.getOwner()); assertNotNull(cardSource.getOwner().getAddress()); assertEquals("Sheboygan", cardSource.getOwner().getAddress().getCity()); assertEquals("WI", cardSource.getOwner().getAddress().getState()); assertEquals("53081", cardSource.getOwner().getAddress().getPostalCode());