@Test public void noChildren() throws Exception { Type typeMock = createMock(Type.class); typeMock.addChildren(schemaMock, schemaXmlElementProcessorMock, "Name", "Type", OccursEnum.optional); expect(typeMock.getTypeParent(schemaMock)).andReturn(null); replay(typeMock); replay(schemaXmlElementProcessorMock); expect(schemaMock.getType("Type")).andReturn(typeMock); replay(schemaMock); Element element = new Element("Name", "Type", OccursEnum.optional); element.addToProcessor(schemaMock, schemaXmlElementProcessorMock); verify(typeMock); }
public void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor) throws Exception { Type type = schema.getType(tagType); type.addChildren(schema, processor, tagName, tagType, occurs); Type typeParent = type.getTypeParent(schema); if (typeParent != null) { typeParent.addChildren(schema, processor, tagName, tagType, occurs); } }
Element { public void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor) throws Exception { Type type = schema.getType(tagType); type.addChildren(schema, processor, tagName, tagType, occurs); Type typeParent = type.getTypeParent(schema); if (typeParent != null) { typeParent.addChildren(schema, processor, tagName, tagType, occurs); } } }
Element { public void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor) throws Exception { Type type = schema.getType(tagType); type.addChildren(schema, processor, tagName, tagType, occurs); Type typeParent = type.getTypeParent(schema); if (typeParent != null) { typeParent.addChildren(schema, processor, tagName, tagType, occurs); } } Element(
      @Nonnull final String elementNameParam,
      @Nonnull final String elementTypeParam,
      @Nonnull final OccursEnum elementOccursParam); }
Element { public void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor) throws Exception { Type type = schema.getType(tagType); type.addChildren(schema, processor, tagName, tagType, occurs); Type typeParent = type.getTypeParent(schema); if (typeParent != null) { typeParent.addChildren(schema, processor, tagName, tagType, occurs); } } Element(
      @Nonnull final String elementNameParam,
      @Nonnull final String elementTypeParam,
      @Nonnull final OccursEnum elementOccursParam); void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor); void addToSubstGroup(
      @Nonnull final Schema schema,
      @Nonnull final SubstitutionGroup substitutionGroup,
      @Nonnull final XmlType xmlType); @Nonnull String getTagName(); }
Element { public void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor) throws Exception { Type type = schema.getType(tagType); type.addChildren(schema, processor, tagName, tagType, occurs); Type typeParent = type.getTypeParent(schema); if (typeParent != null) { typeParent.addChildren(schema, processor, tagName, tagType, occurs); } } Element(
      @Nonnull final String elementNameParam,
      @Nonnull final String elementTypeParam,
      @Nonnull final OccursEnum elementOccursParam); void addToProcessor(@Nonnull final Schema schema, @Nonnull final XmlProcessorType processor); void addToSubstGroup(
      @Nonnull final Schema schema,
      @Nonnull final SubstitutionGroup substitutionGroup,
      @Nonnull final XmlType xmlType); @Nonnull String getTagName();  }