Examples of ExposableFriend


Examples of org.jongo.model.ExposableFriend

    @Test
    public void canFindWithStringAsObjectId() {
         /* given */
        String id = ObjectId.get().toString();
        ExposableFriend friend = new ExposableFriend(id, "John");
        collection.save(friend);

        /* when */
        Iterator<ExposableFriend> friends = collection.find(withOid(friend.getId())).as(ExposableFriend.class);

        /* then */
        ExposableFriend john = friends.next();
        assertThat(john.getId()).isEqualTo(id);
        assertThat(john.getName()).isEqualTo("John");
        assertThat(friends.hasNext()).isFalse();
    }
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.