XSParticle quantity = itemGroupParticles[1];
assertEquals(1, quantity.getMinOccurs());
assertEquals(1, quantity.getMaxOccurs());
XSElement quantityElement = assertElement(quantity);
assertEquals(new XsQName((String) null, "quantity"), quantityElement.getName());
XSSimpleType quantitySimpleType = assertSimpleType(quantityElement.getType());
assertEquals(XSPositiveInteger.getInstance(), assertRestriction(quantitySimpleType));
// Items.item.USPrice
// <xsd:element name='USPrice' type='xsd:decimal'/>
XSParticle usPrice = itemGroupParticles[2];
assertEquals(1, usPrice.getMinOccurs());
assertEquals(1, usPrice.getMaxOccurs());
XSElement usPriceElement = assertElement(usPrice);
assertEquals(new XsQName((String) null, "USPrice"), usPriceElement.getName());
assertEquals(XSDecimal.getInstance(), usPriceElement.getType());
// Items.item.comment
// <xsd:element ref='comment' minOccurs='0'/>
XSParticle comment = itemGroupParticles[3];
assertEquals(comment.getMinOccurs(), 0);
assertEquals(comment.getMaxOccurs(), 1);
XSElement commentElement = assertElement(comment);
assertEquals(new XsQName((String) null, "comment"), commentElement.getName());
assertEquals(XSString.getInstance(), commentElement.getType());
// Items.item.shipDate
// <xsd:element name='shipDate' type='xsd:date' minOccurs='0'/>
XSParticle shipDate = itemGroupParticles[4];
assertEquals(shipDate.getMinOccurs(), 0);
assertEquals(shipDate.getMaxOccurs(), 1);
XSElement shipDateElement = assertElement(shipDate);
assertEquals(XSDate.getInstance(), shipDateElement.getType());
// PurchaseOrderType
XSType purchaseOrderType = schemaTypes[0];
assertTrue(purchaseOrderType.isGlobal());
assertEquals(new XsQName((String) null, "PurchaseOrderType"), purchaseOrderType.getName());
XSComplexType purchaseOrderTypeComplexType = assertComplexType(purchaseOrderType);
XSParticle purchaseOrderTypeParticle = assertComplexContent(purchaseOrderTypeComplexType);
XSGroup purchaseOrderTypeGroup = assertGroup(purchaseOrderTypeParticle);
assertSequence(purchaseOrderTypeGroup);
XSAttributable[] potAttributes = purchaseOrderTypeComplexType.getAttributes();
assertEquals(1, potAttributes.length);
// PurchaseOrderType.orderDate
// <xsd:attribute name='orderDate' type='xsd:date'/>
XSAttribute orderDate = (XSAttribute) potAttributes[0];
assertEquals(new XsQName((String) null, "orderDate"), orderDate.getName());
assertEquals(XSDate.getInstance(), orderDate.getType());
XSParticle[] potChildren = purchaseOrderTypeGroup.getParticles();
assertEquals(4, potChildren.length);
// PurchaseOrderType.shipTo
// <xsd:element name='shipTo' type='USAddress'/>
XSParticle shipTo = potChildren[0];
assertEquals(1, shipTo.getMinOccurs());
assertEquals(1, shipTo.getMaxOccurs());
XSElement shipToElement = assertElement(shipTo);
assertEquals(new XsQName((String) null, "shipTo"), shipToElement.getName());
XSType shipToType = shipToElement.getType();
assertTrue(shipToType.isGlobal());
assertEquals(new XsQName((String) null, "USAddress"), shipToType.getName());
// PurchaseOrderType.billTo
// <xsd:element name='billTo' type='USAddress'/>
XSParticle billTo = potChildren[1];
assertEquals(1, billTo.getMinOccurs());
assertEquals(1, billTo.getMaxOccurs());
XSElement billToElement = assertElement(billTo);
assertEquals(new XsQName((String) null, "billTo"), billToElement.getName());
XSType billToType = billToElement.getType();
assertEquals(shipToType, billToType);
// PurchaseOrderType.comment
// <xsd:element ref='comment' minOccurs='0'/>
XSParticle potComment = potChildren[2];
assertEquals(0, potComment.getMinOccurs());
assertEquals(1, potComment.getMaxOccurs());
XSElement potCommentElement = assertElement(potComment);
assertEquals(new XsQName((String) null, "comment"), potCommentElement.getName());
assertEquals(potCommentElement.getType(), commentElement.getType());
// PurchaseOrderType.items
// <xsd:element name='items' type='Items'/>
XSParticle potItems = potChildren[3];
assertEquals(1, potItems.getMinOccurs());
assertEquals(1, potItems.getMaxOccurs());
XSElement potItemsElement = assertElement(potItems);
assertEquals(new XsQName((String) null, "items"), potItemsElement.getName());
assertEquals(items, potItemsElement.getType());
// SKU
XSType sku = schemaTypes[3];
assertTrue(sku.isGlobal());
assertEquals(new XsQName((String) null, "SKU"), sku.getName());
XSSimpleType skuSimpleType = assertSimpleType(sku);
assertEquals(XSString.getInstance(), assertRestriction(skuSimpleType));
assertEquals(sku, partNumType);
// USAddress
// <xsd:complexType name='USAddress'>