Package com.volantis.shared.metadata.value.immutable

Examples of com.volantis.shared.metadata.value.immutable.ImmutableNumberValue


         if (!(value instanceof ImmutableNumberValue)) {
            fail("Expected a ImmutableNumberValue but got a " +
                 value.getClass().toString());
        }

        ImmutableNumberValue num = (ImmutableNumberValue) value;
        assertEquals("ImmutableNumberValue is invalid",
                     expectedInt,
                     num.getValueAsNumber().intValue());

        return num;
    }
View Full Code Here


        final Object otherList = doRoundTrip(list);
        assertEquals(list, otherList);
    }

    public void testNumberByte() throws Exception {
        final ImmutableNumberValue number = (ImmutableNumberValue) unmarshall(
            getResourceAsString("res/number.xml"),
            ImmutableNumberValueImpl.class);

        // check the created object
        assertEquals(new Byte("42"), number.getValueAsNumber());

        final Object otherNumber = doRoundTrip(number);
        assertEquals(number, otherNumber);
    }
View Full Code Here

            (ImmutableStructureValue) addressFields.get("postal");

        final Map postalFields = postalValue.getFieldValuesAsMap();
        assertEquals(4, postalFields.size());

        final ImmutableNumberValue houseNumberValue =
            (ImmutableNumberValue) postalFields.get("house-number");
        assertEquals(new Integer(42), houseNumberValue.getValueAsNumber());
        final ImmutableStringValue streetNameValue =
            (ImmutableStringValue) postalFields.get("street-name");
        assertEquals("Foo", streetNameValue.getValueAsString());
        final ImmutableStringValue streetTypeValue =
            (ImmutableStringValue) postalFields.get("street-type");
View Full Code Here

TOP

Related Classes of com.volantis.shared.metadata.value.immutable.ImmutableNumberValue

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.