Package org.jongo.model

Examples of org.jongo.model.Friend


        ObjectId id = new ObjectId("47cc67093475061e3d95369d");
        WriteResult writeResult = collection.remove(id);

        /* then */
        assertThat(writeResult).isNotNull();
        Friend friend = collection.findOne().as(Friend.class);
        assertThat(friend).isNull();
    }
View Full Code Here


        /* when */
        WriteResult writeResult = collection.remove("{name:#}", "John");

        /* then */
        assertThat(writeResult).isNotNull();
        Friend friend = collection.findOne().as(Friend.class);
        assertThat(friend).isNull();
    }
View Full Code Here

        /* when */
        WriteResult writeResult = collection.remove();

        /* then */
        assertThat(writeResult).isNotNull();
        Friend friend = collection.findOne().as(Friend.class);
        assertThat(friend).isNull();
    }
View Full Code Here

    }

    @Test
    public void whenNoSpecifyShouldSaveWithCollectionWriteConcern() throws Exception {

        Friend john = new Friend("John");
        collection.save(john);

        WriteResult writeResult = collection.save(john);

        assertThat(writeResult.getLastConcern()).isEqualTo(collection.getDBCollection().getWriteConcern());
View Full Code Here

    }

    @Test
    public void canRemoveWithWriteConcern() throws Exception {

        Friend john = new Friend("John");
        collection.save(john);

        WriteResult writeResult = collection.withWriteConcern(WriteConcern.SAFE).remove();

        assertThat(writeResult.getLastConcern()).isEqualTo(WriteConcern.SAFE);
View Full Code Here

import java.net.UnknownHostException;

class BenchUtil {

    public static Friend createFriend(int id) {
        return new Friend("John" + id, "Address" + id, new Coordinate(1, id));
    }
View Full Code Here

TOP

Related Classes of org.jongo.model.Friend

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.