Package com.volantis.shared.metadata.type

Examples of com.volantis.shared.metadata.type.MetaDataType


        final ImmutableListType listType = (ImmutableListType) unmarshall(
            getResourceAsString("res/list-with-member-type-constraint-string.xml"),
            ImmutableListTypeImpl.class);

        // check the created object
        final MetaDataType memberType =
            listType.getMemberTypeConstraint().getMemberType();
        assertTrue(memberType instanceof StringType);

        final Object otherListType = doRoundTrip(listType);
        assertEquals(listType, otherListType);
View Full Code Here


        final ImmutableListType listType = (ImmutableListType) unmarshall(
            getResourceAsString("res/list-with-member-type-constraint-boolean.xml"),
            ImmutableListTypeImpl.class);

        // check the created object
        final MetaDataType memberType =
            listType.getMemberTypeConstraint().getMemberType();
        assertTrue(memberType instanceof BooleanType);

        final Object otherListType = doRoundTrip(listType);
        assertEquals(listType, otherListType);
View Full Code Here

        final ImmutableSetType setType = (ImmutableSetType) unmarshall(
            getResourceAsString("res/set-with-member-type-constraint-string.xml"),
            ImmutableSetTypeImpl.class);

        // check the created object
        final MetaDataType memberType =
            setType.getMemberTypeConstraint().getMemberType();
        assertTrue(memberType instanceof StringType);

        final Object otherSetType = doRoundTrip(setType);
        assertEquals(setType, otherSetType);
View Full Code Here

        final ImmutableSetType setType = (ImmutableSetType) unmarshall(
            getResourceAsString("res/set-with-member-type-constraint-boolean.xml"),
            ImmutableSetTypeImpl.class);

        // check the created object
        final MetaDataType memberType =
            setType.getMemberTypeConstraint().getMemberType();
        assertTrue(memberType instanceof BooleanType);

        final Object otherSetType = doRoundTrip(setType);
        assertEquals(setType, otherSetType);
View Full Code Here

            (ImmutableMemberTypeConstraintImpl) unmarshall(
                getResourceAsString("res/member-type-constraint-string.xml"),
                ImmutableMemberTypeConstraintImpl.class);

        // check the created object
        final MetaDataType memberType = constraint.getMemberType();
        assertTrue(memberType instanceof StringType);

        final Object otherConstraint = doRoundTrip(constraint);
        assertEquals(constraint, otherConstraint);
    }
View Full Code Here

     * Creates an empty collection value.
     */
    protected abstract MutableCollectionValue createEmptyValue();

    public void testVerify() {
        final MetaDataType collectionType = (MetaDataType) getMutableInhibitor();

        // normal case
        final MutableCollectionValue collectionValue =
            createCollectionValue(new String[]{"one", "two"});
        Collection errors = collectionType.verify(collectionValue);
        assertEquals(0, errors.size());

        // invalid type
        BooleanValue booleanValue = VALUE_FACTORY.createBooleanValue();
        errors = collectionType.verify(booleanValue);
        assertEquals(1, errors.size());
        VerificationError error =
            (VerificationError) errors.iterator().next();
        assertEquals(VerificationError.TYPE_INVALID_IMPLEMENTATION,
            error.getType());
View Full Code Here

TOP

Related Classes of com.volantis.shared.metadata.type.MetaDataType

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.