use of oasis.names.tc.ebxml_regrep.xsd.rim._3.PostalAddressType in project ddf by codice.
the class RegistryPackageTypeHelperTest method assertOrganizations.
private void assertOrganizations(List<OrganizationType> organizations) {
// Values from xml file
int expectedSize = 1;
int expectedOrganizationsSize = 2;
String expectedName = "Codice";
String expectedCity = "Phoenix";
String expectedCountry = "USA";
String expectedPostalCode = "85037";
String expectedState = "AZ";
String expectedStreet = "1234 Some Street";
String expectedAreaCode = "555";
String expectedNumber = "555-5555";
String expectedExtension = "1234";
String expectedCountryCode = null;
String expectedPhoneType = null;
String expectedEmail = "emailaddress@something.com";
String expectedParent = "urn:uuid:2014ca7f59ac46f495e32b4a67a51276";
String expectedPrimaryContact = "somePrimaryContact";
assertThat(organizations, hasSize(expectedOrganizationsSize));
OrganizationType organization = organizations.get(0);
assertThat(organization.isSetName(), is(true));
assertIst(organization.getName(), expectedName);
assertThat(organization.isSetAddress(), is(true));
List<PostalAddressType> addresses = organization.getAddress();
assertThat(addresses, hasSize(expectedSize));
assertAddress(addresses.get(0), expectedCity, expectedCountry, expectedPostalCode, expectedState, expectedStreet);
assertThat(organization.isSetTelephoneNumber(), is(true));
List<TelephoneNumberType> phoneNumbers = organization.getTelephoneNumber();
assertThat(phoneNumbers, hasSize(expectedSize));
assertPhoneNumbers(phoneNumbers.get(0), expectedAreaCode, expectedNumber, expectedExtension, expectedCountryCode, expectedPhoneType);
assertThat(organization.isSetEmailAddress(), is(true));
assertThat(organization.getEmailAddress(), hasSize(expectedSize));
List<EmailAddressType> emailAddresses = organization.getEmailAddress();
assertThat(emailAddresses.get(0).getAddress(), is(equalTo(expectedEmail)));
assertThat(organization.isSetParent(), is(true));
assertThat(organization.getParent(), is(equalTo(expectedParent)));
assertThat(organization.isSetPrimaryContact(), is(true));
assertThat(organization.getPrimaryContact(), is(equalTo(expectedPrimaryContact)));
}
Aggregations