@DataProvider(name = "setupAddress") public static Object[][] createAddress() { Address address1 = new AddressImpl(); address1.setAddressLine1("1234 Merit Drive"); address1.setCity("Dallas"); State state = new StateImpl(); state.setAbbreviation("TX"); address1.setState(state); address1.setPostalCode("75251"); Address address2 = new AddressImpl(); address2.setAddressLine1("12 Testing Drive"); address2.setCity("San Jose"); state = new StateImpl(); state.setAbbreviation("CA"); address2.setState(state); address2.setPostalCode("75251"); return new Object[][] { new Object[] { address1 }, new Object[] { address2 } }; } }
+ " as a state abbreviation in BLC_STATE"); address.setState(state);
public CheckoutForm() { shippingAddress = new AddressImpl(); billingAddress = new AddressImpl(); shippingAddress.setPhonePrimary(new PhoneImpl()); billingAddress.setPhonePrimary(new PhoneImpl()); shippingAddress.setPhoneSecondary(new PhoneImpl()); billingAddress.setPhoneSecondary(new PhoneImpl()); shippingAddress.setPhoneFax(new PhoneImpl()); billingAddress.setPhoneFax(new PhoneImpl()); shippingAddress.setIsoCountryAlpha2(new ISOCountryImpl()); billingAddress.setIsoCountryAlpha2(new ISOCountryImpl()); isSameAddress = true; /** * @deprecated - setCountry() and setState() on address have been deprecated in favor of ISO standardization. * Leaving here for legacy implementations. */ shippingAddress.setCountry(new CountryImpl()); billingAddress.setCountry(new CountryImpl()); shippingAddress.setState(new StateImpl()); billingAddress.setState(new StateImpl()); }
cloned.setStateProvinceRegion(stateProvinceRegion); cloned.setPhoneSecondary(phoneSecondary); cloned.setState(state); cloned.setCountry(country); return createResponse;
/** * This method only exists because so many other tests depend on it, but should be removed once tests are more isolated * @param customerAddress */ @Deprecated @Test(groups = "createCustomerAddress", dataProvider = "setupCustomerAddress", dataProviderClass = CustomerAddressDataProvider.class, dependsOnGroups = {"readCustomer", "createCountry", "createState"}) @Transactional @Rollback(false) public void createCustomerAddress(CustomerAddress customerAddress) { userName = "customer1"; Customer customer = customerService.readCustomerByUsername(userName); assert customerAddress.getId() == null; customerAddress.setCustomer(customer); State state = stateService.findStateByAbbreviation("KY"); customerAddress.getAddress().setState(state); Country country = countryService.findCountryByAbbreviation("US"); customerAddress.getAddress().setCountry(country); customerAddress.getAddress().setIsoCountrySubdivision("US-KY"); ISOCountry isoCountry = isoService.findISOCountryByAlpha2Code("US"); customerAddress.getAddress().setIsoCountryAlpha2(isoCountry); customerAddress = customerAddressService.saveCustomerAddress(customerAddress); assert customer.equals(customerAddress.getCustomer()); userId = customerAddress.getCustomer().getId(); }
dest.setAddressLine2(orig.getAddressLine2()); dest.setCity(orig.getCity()); dest.setState(orig.getState()); dest.setCounty(orig.getCounty()); dest.setIsoCountrySubdivision(orig.getIsoCountrySubdivision());
/** * Saves a customerAddress with state KY and country US. Requires that createCountry() and createState() have been called * @param customerAddress */ public CustomerAddress saveCustomerAddress(CustomerAddress customerAddress) { State state = stateService.findStateByAbbreviation("KY"); customerAddress.getAddress().setState(state); Country country = countryService.findCountryByAbbreviation("US"); customerAddress.getAddress().setCountry(country); customerAddress.getAddress().setIsoCountrySubdivision("US-KY"); ISOCountry isoCountry = isoService.findISOCountryByAlpha2Code("US"); customerAddress.getAddress().setIsoCountryAlpha2(isoCountry); return customerAddressService.saveCustomerAddress(customerAddress); }
private Address buildAddress() { Address address = new AddressImpl(); address.setAddressLine1("123 Test Rd"); address.setCity("Dallas"); address.setFirstName("Jeff"); address.setLastName("Fischer"); address.setPostalCode("75240"); address.setPrimaryPhone("972-978-9067"); State state = new StateImpl(); state.setAbbreviation("ALL"); state.setName("ALL"); address.setState(state); Country country = new CountryImpl(); country.setAbbreviation("US"); country.setName("United States"); state.setCountry(country); address.setCountry(country); ISOCountry isoCountry = new ISOCountryImpl(); isoCountry.setAlpha2("US"); isoCountry.setName("UNITED STATES"); address.setIsoCountryAlpha2(isoCountry); return address; } }
address.setState(state); address.setCountry(country); address.setIsoCountrySubdivision("US-TX");
address.setPrimaryPhone("972-978-9067"); address.setState(state); address.setCountry(country); address.setIsoCountrySubdivision("US-TX");
address.setPostalCode("75240"); address.setPrimaryPhone("972-978-9067"); address.setState(state); address.setCountry(country); address.setIsoCountrySubdivision("US-TX");
address.setPostalCode("75240"); address.setPrimaryPhone("972-978-9067"); address.setState(stateService.findStateByAbbreviation("KY")); address.setCountry(countryService.findCountryByAbbreviation("US")); address.setIsoCountrySubdivision("US-KY");