Package org.apache.cayenne

Examples of org.apache.cayenne.MockSerializable


        DataContext context = createDataContext();

        SerializableEntity test = context
                .newObject(SerializableEntity.class);

        MockSerializable i = new MockSerializable("abc");
        test.setSerializableField(i);
        context.commitChanges();

        SelectQuery q = new SelectQuery(SerializableEntity.class);
        SerializableEntity testRead = (SerializableEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getSerializableField());
        assertEquals(i.getName(), testRead.getSerializableField().getName());

        test.setSerializableField(null);
        context.commitChanges();
    }
View Full Code Here


        }

        SerializableEntity test = context
                .newObject(SerializableEntity.class);

        MockSerializable i = new MockSerializable("abc");
        test.setSerializableField(i);
        context.commitChanges();

        SelectQuery q = new SelectQuery(SerializableEntity.class);
        SerializableEntity testRead = (SerializableEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getSerializableField());
        assertEquals(i.getName(), testRead.getSerializableField().getName());

        test.setSerializableField(null);
        context.commitChanges();
    }
View Full Code Here

        DataContext context = createDataContext();

        SerializableEntity test = context
                .newObject(SerializableEntity.class);

        MockSerializable i = new MockSerializable("abc");
        test.setSerializableField(i);
        context.commitChanges();

        SelectQuery q = new SelectQuery(SerializableEntity.class);
        SerializableEntity testRead = (SerializableEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getSerializableField());
        assertEquals(i.getName(), testRead.getSerializableField().getName());

        test.setSerializableField(null);
        context.commitChanges();
    }
View Full Code Here

        }

        SerializableEntity test = context
                .newObject(SerializableEntity.class);

        MockSerializable i = new MockSerializable("abc");
        test.setSerializableField(i);
        context.commitChanges();

        SelectQuery q = new SelectQuery(SerializableEntity.class);
        SerializableEntity testRead = (SerializableEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getSerializableField());
        assertEquals(i.getName(), testRead.getSerializableField().getName());

        test.setSerializableField(null);
        context.commitChanges();
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.MockSerializable

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.