Examples of ImmutableMinimumValueConstraint


Examples of com.volantis.shared.metadata.type.constraint.immutable.ImmutableMinimumValueConstraint

        final Object otherConstraint = doRoundTrip(constraint);
        assertEquals(constraint, otherConstraint);
    }

    public void testMinimumValueConstraintDouble() throws Exception {
        final ImmutableMinimumValueConstraint constraint =
            (ImmutableMinimumValueConstraint) unmarshall(
                getResourceAsString("res/minimum-value-constraint-double.xml"),
                ImmutableMinimumValueConstraintImpl.class);

        // check the created object
        assertEquals(new Double(4.2d), constraint.getLimitAsNumber());

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

Examples of com.volantis.shared.metadata.type.constraint.immutable.ImmutableMinimumValueConstraint

        final ImmutableNumberType houseNumberType =
            (ImmutableNumberType) houseNumberDef.getType();
        final ImmutableNumberSubTypeConstraint subTypeConstraint =
            houseNumberType.getNumberSubTypeConstraint();
        assertEquals(Integer.class, subTypeConstraint.getNumberSubType());
        final ImmutableMinimumValueConstraint minimumValueConstraint =
            houseNumberType.getMinimumValueConstraint();
        assertEquals(new Integer(0), minimumValueConstraint.getLimitAsNumber());

        final Object otherAddress = doRoundTrip(rootType);
        assertEquals(rootType, otherAddress);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.