SchemaSG jschema = parse(schema, "testElements.xsd");
ObjectSG[] elements = jschema.getElements();
assertEquals(4, elements.length);
ObjectSG e1 = elements[0];
assertEquals(new XsQName((String) null, "a"), e1.getName());
TypeSG t1 = e1.getTypeSG();
assertTrue(!t1.isComplex());
assertTrue(t1.getSimpleTypeSG().isAtomic());
assertEquals(t1.getSimpleTypeSG().getRuntimeType(), JavaQNameImpl.getInstance(String.class));
ObjectSG e2 = elements[1];
assertEquals(new XsQName((String) null, "b"), e2.getName());
TypeSG t2 = e2.getTypeSG();
assertTrue(!t2.isComplex());
SimpleTypeSG st2 = t2.getSimpleTypeSG();
assertTrue(st2.isAtomic());
assertEquals(JavaQNameImpl.getInstance(float.class), st2.getRuntimeType());
ObjectSG e3 = elements[2];
assertEquals(new XsQName((String) null, "c"), e3.getName());
TypeSG t3 = e3.getTypeSG();
assertTrue(t3.isComplex());
ComplexTypeSG ct3 = t3.getComplexTypeSG();
assertTrue(!ct3.hasSimpleContent());
ComplexContentSG cct3 = ct3.getComplexContentSG();
ParticleSG[] childs = cct3.getGroupSG().getParticles();
assertEquals(2, childs.length);
assertTrue(childs[0].isElement());
ObjectSG child1 = childs[0].getObjectSG();
assertEquals(new XsQName((String) null, "a"), child1.getName());
assertTrue(childs[1].isElement());
ObjectSG child2 = childs[1].getObjectSG();
assertEquals(new XsQName((String) null, "d"), child2.getName());
assertTrue(!child2.getTypeSG().isComplex());
SimpleTypeSG st4 = child2.getTypeSG().getSimpleTypeSG();
assertEquals(JavaQNameImpl.getInstance(double.class.getName()), st4.getRuntimeType());
AttributeSG[] attributes = ct3.getAttributes();
assertEquals(1, attributes.length);
assertEquals(new XsQName((String) null, "e"), attributes[0].getName());
assertTrue(!attributes[0].getTypeSG().isComplex());
ObjectSG e4 = elements[3];
assertTrue(e4.getTypeSG().isComplex());
ComplexTypeSG ct4 = e4.getTypeSG().getComplexTypeSG();
assertTrue(ct4.hasSimpleContent());
SimpleContentSG sct4 = ct4.getSimpleContentSG();
assertTrue(!sct4.getContentTypeSG().isComplex());
assertEquals(JavaQNameImpl.getInstance(int.class), sct4.getContentTypeSG().getRuntimeType());
assertEquals(1, ct4.getAttributes().length);