Package com.volantis.mcs.xml.schema.impl.model

Examples of com.volantis.mcs.xml.schema.impl.model.ElementSchemaImpl


        // =====================================================================

        ContentModel model = new EmptyContentImpl();

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, model);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
View Full Code Here


        ContentChoiceImpl choice = new ContentChoiceImpl();
        choice.add(aReferenceMock).add(bReferenceMock);

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, choice);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
View Full Code Here

        // =====================================================================

        BoundedContent bounded = new BoundedContentImpl(aReferenceMock);

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, bounded);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
View Full Code Here

        ContentModel bounded = new BoundedContentImpl(aReferenceMock)
                .atLeastOne();

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, bounded);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
View Full Code Here

        ContentModel sequence = new ContentSequenceImpl()
                .add(aReferenceMock)
                .add(bReferenceMock);

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, sequence);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
View Full Code Here

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);

        ElementSchema schema1 =
                new ElementSchemaImpl(containingElement, aReferenceMock);


        // Create validators for the same model so the element validator
        // should be the same.
        ElementValidator validator1 = builder.build(schema1);

        assertEquals(
                "Element validator should match", elementValidatorMock,
                validator1);

        // Create validator for a different model but using part of the
        // previous model so the content validator should be reused.
        ContentModel bounded = new BoundedContentImpl(aReferenceMock);
        ElementSchema schema2 =
                new ElementSchemaImpl(containingElement, bounded);
        ElementValidator validator3 = builder.build(schema2);

        assertEquals(
                "Second element validator should match", elementValidator2Mock,
                validator3);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xml.schema.impl.model.ElementSchemaImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.