private void assertPropertyNamesAndTypeNames(ComplexType parentType,
Map expectedPropertiesAndTypes) throws Exception {
for (Iterator it = expectedPropertiesAndTypes.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Entry) it.next();
Name dName = (Name) entry.getKey();
Name expectedDescriptorTypeName = (Name) entry.getValue();
AttributeDescriptor d = (AttributeDescriptor) Types.descriptor(parentType, dName);
assertNotNull("Descriptor " + dName + " not found for type " + parentType.getName(), d);
AttributeType type;
try {
type = (AttributeType) d.getType();
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "type not parsed for "
+ ((AttributeDescriptor) d).getName(), e);
throw e;
}
assertNotNull(type);
Name actualTypeName = type.getName();
assertNotNull(actualTypeName);
assertNotNull(type.getBinding());
if (expectedDescriptorTypeName != null) {
assertEquals("type mismatch for property " + dName, expectedDescriptorTypeName,
actualTypeName);