Package org.apache.cayenne.testdo.testmap

Examples of org.apache.cayenne.testdo.testmap.BoxInfo


        Box bx1 = context.newObject(Box.class);
        invalidate.add(bx1);
        bx1.setName("big");
        bx1.setBag(b1);

        BoxInfo bi1 = context.newObject(BoxInfo.class);
        invalidate.add(bi1);
        bi1.setColor("red");
        bi1.setBox(bx1);

        Box bx2 = context.newObject(Box.class);
        invalidate.add(bx2);
        bx2.setName("small");
        bx2.setBag(b1);

        BoxInfo bi2 = context.newObject(BoxInfo.class);
        invalidate.add(bi2);
        bi2.setColor("green");
        bi2.setBox(bx2);

        Thing t1 = context.newObject(Thing.class);
        invalidate.add(t1);
        t1.setVolume(10);
        t1.setWeight(10);
View Full Code Here


            public void execute() {
                assertFalse(result.isEmpty());
                List<String> boxColors = new ArrayList<String>();
                for (Box box : result) {
                    BoxInfo info = (BoxInfo) box
                            .readPropertyDirectly(Box.BOX_INFO_PROPERTY);
                    assertNotNull(info);
                    boxColors.add(info.getColor());
                    assertEquals(PersistenceState.COMMITTED, info.getPersistenceState());
                }
                assertTrue(boxColors.containsAll(Arrays.asList("red", "green")));
            }
        });
    }
View Full Code Here

            public void execute() {
                assertFalse(result.isEmpty());
                List<String> boxColors = new ArrayList<String>();
                for (Box box : result) {
                    BoxInfo info = (BoxInfo) box
                            .readPropertyDirectly(Box.BOX_INFO_PROPERTY);
                    assertNotNull(info);
                    boxColors.add(info.getColor());
                    assertEquals(PersistenceState.COMMITTED, info.getPersistenceState());
                }
                assertTrue(boxColors.containsAll(Arrays.asList("red", "green")));
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.testdo.testmap.BoxInfo

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.