public void createState() { State state = new StateImpl(); state.setAbbreviation("KY"); state.setName("Kentucky"); state.setCountry(countryService.findCountryByAbbreviation("US")); stateService.save(state); }
@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 } }; } }
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; } }
state.setAbbreviation("TX"); state.setName("Texas"); state.setCountry(country);
state.setAbbreviation("TX"); state.setName("Texas"); state.setCountry(country);
state.setAbbreviation("TX"); state.setCountry(country); state.setName("Texas"); state2.setAbbreviation("TX"); state2.setCountry(country2); state2.setName("Texas");
state.setAbbreviation("TX"); state.setCountry(country); state.setName("Texas"); state2.setAbbreviation("TX"); state2.setCountry(country2); state2.setName("Texas");
state.setAbbreviation("TX"); state.setName("Texas"); state.setCountry(country);