Package com.volantis.shared.metadata

Examples of com.volantis.shared.metadata.MetaDataObject


            throw new RuntimeException(e);
        }
    }

    public void testPersistence() throws Exception {
        MetaDataObject mdo = (MetaDataObject) getImmutableInhibitor();
        MetaDataObject result = checkPersistence(mdo);
        assertEquals("The detached object is not equal to the object " +
            "before persistence", mdo, result);
    }
View Full Code Here


        MutableStructureType mdo = new MutableStructureTypeImpl();
        Set fields = mdo.getMutableFields();
        fields.add(new ImmutableFieldDefinitionImpl("hello"));
        fields.add(new ImmutableFieldDefinitionImpl("there"));

        MetaDataObject result = checkPersistence((MetaDataObject)mdo.createImmutable());
        assertEquals("The detached object is not equal to the object " +
            "before persistence", mdo, result);
        MetaDataObject result2 = checkPersistence(mdo);

    }
View Full Code Here

        oos.writeObject(object);
        oos.flush();
        byte[] data = baos.toByteArray();
        ObjectInputStream ois = new ObjectInputStream(
                new ByteArrayInputStream(data));
        MetaDataObject result = (MetaDataObject) ois.readObject();
        return result;
    }
View Full Code Here

        throws Exception {
        if (object == null) {
            throw new IllegalArgumentException("Argument must not be null");
        }
        Object id = persistence.persistObject(object);
        MetaDataObject result = (MetaDataObject) persistence.retrieveObject(id);
        assertEquals(object.hashCode(), result.hashCode());
        assertEquals(object, result);
        return result;
    }
View Full Code Here

     * @param object the HTTPMessageEntity to test
     *
     */
    public static void checkEquality(MetaDataObject object)
            throws Exception {
        MetaDataObject result = checkSerialization(object);
        assertEquals("The deserialized object is not equal to the object " +
                "before serialization", object, result);
    }
View Full Code Here

     * Test the implementors or the MetaDataObject interface for
     * correct Serialization behaviour.
     * @throws java.lang.Exception
     */
    public void testHTTPSerialization() throws Exception {
        MetaDataObject mdo = (MetaDataObject) getImmutableInhibitor();
        checkEquality(mdo);
    }
View Full Code Here

        MetaDataObject mdo = (MetaDataObject) getImmutableInhibitor();
        checkEquality(mdo);
    }

    public void testPersistence() throws Exception {
        MetaDataObject mdo = (MetaDataObject) getImmutableInhibitor();
        MetaDataObject result = checkPersistence(mdo);
        assertEquals("The detached object is not equal to the object " +
                     "before persistence", mdo, result);
    }
View Full Code Here

    /**
     * Tests serialisation
     * @throws Exception
     */
    public void testSerialization() throws Exception {
        MetaDataObject originalObject = (MetaDataObject) getImmutableInhibitor();
        MetaDataObject result = checkSerialization(originalObject);
        assertEquals("The orignal and the serialized and deserialized object " +
            "must have the same hash code",
                     originalObject.hashCode(), result.hashCode());
        assertEquals("The original and the serialized and deserialized object " +
                "should be equal" , originalObject, result);
    }
View Full Code Here

        oos.writeObject(object);
        oos.flush();
        byte[] data = baos.toByteArray();
        ObjectInputStream ois = new ObjectInputStream(
                new ByteArrayInputStream(data));
        MetaDataObject result = (MetaDataObject) ois.readObject();
        return result;
    }
View Full Code Here

TOP

Related Classes of com.volantis.shared.metadata.MetaDataObject

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.