Package test.com.william.document

Examples of test.com.william.document.Blog.save()


            e.printStackTrace();
        }
        //now you can use it

        Blog blog = Blog.create(map("userName", "yes", "_id", 1000));
        blog.save();
        blog = Blog.findById(1000);
        Assert.assertTrue("yes".equals(blog.getUserName()));

        Blog blog2 = Blog.create(map("userName", "no", "_id", 1001));
        blog2.save();
View Full Code Here


        blog.save();
        blog = Blog.findById(1000);
        Assert.assertTrue("yes".equals(blog.getUserName()));

        Blog blog2 = Blog.create(map("userName", "no", "_id", 1001));
        blog2.save();
        blog2 = Blog.findById(1001);
        Assert.assertTrue("no".equals(blog2.getUserName()));

        List<Blog> blogs = Blog.findAll();
        Assert.assertTrue(blogs.size() >= 2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.