Package mungbean

Examples of mungbean.TestObjectWithId


            context.dbAdmin().dropDatabase();
        }

        public void objectWithIdCanBeStored() {
            final DBCollection<TestObjectWithId> collection = context.openCollection("foo", TestObjectWithId.class);
            final TestObjectWithId item = collection.save(new TestObjectWithId("foo", 123));
            TestObjectWithId itemFromDb = collection.find(item.id());

            specify(collection.query(new Query().field("name").is("foo")).get(0).value(), does.equal(123));

            specify(itemFromDb.id(), does.equal(item.id()));
            collection.delete(item.id());
            specify(new Block() {
                @Override
                public void run() throws Throwable {
                    collection.find(item.id());
View Full Code Here

TOP

Related Classes of mungbean.TestObjectWithId

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.