예제 #1
0
 @Test
 public void testSerializationFromInFind() throws Exception {
   MockObject mockObject = insertMockObjectWithEmbedded();
   DBCursor<MockObject> cursor = coll.find(DBQuery.in("object", mockObject.object));
   assertThat(cursor.hasNext(), equalTo(true));
   assertThat(cursor.next(), equalTo(mockObject));
 }
예제 #2
0
 @Test
 public void testElemMatchNegative() throws Exception {
   insertMockObjectWithComplexList();
   DBCursor<MockObject> cursor =
       coll.find().elemMatch("complexList", DBQuery.in("value", "foo", "la").size("list", 2));
   assertThat(cursor.hasNext(), equalTo(false));
 }