Package models.edit

Examples of models.edit.DefaultKeyChild


     * Test single relation with default key.
     */
    @Test
    public void testSingleRelationWithDefaultKey()
    {
        DefaultKeyChild child1 = new DefaultKeyChild();
        child1.name = "Child One";
        child1.save();

        HashMap<String, String[]> params = new HashMap<String, String[]>();
        params.put("parent.defaultKeyChild._id", new String[] { child1._key().toString() });
        Parent parent = new Parent();
        parent = parent.edit("parent", params);
       
        Assert.assertNotNull(parent.defaultKeyChild);
        Assert.assertEquals(child1.name, parent.defaultKeyChild.name);
View Full Code Here


     * Test multiple relation with default key.
     */
    @Test
    public void testMultipleRelationWithDefaultKey()
    {
        DefaultKeyChild child1 = new DefaultKeyChild();
        child1.name = "Child One";
        child1.save();

        HashMap<String, String[]> params = new HashMap<String, String[]>();
        params.put("parent.defaultKeyChildren._id", new String[] { child1._key().toString() });
        Parent parent = new Parent();
        parent = parent.edit("parent", params);
       
        Assert.assertNotNull(parent.defaultKeyChildren);
        Assert.assertEquals(1, parent.defaultKeyChildren.size());
View Full Code Here

TOP

Related Classes of models.edit.DefaultKeyChild

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.