@Test(expectedExceptions = IllegalArgumentException.class)
|
public void testDotKeysArrayFail() {
|
DBCollection collection = _db.getCollection("testdotkeysFail");
|
|
DBObject obj = new BasicDBObject("x", 1)
|
.append("y", 2)
|
.append("array", new Object[]{new BasicDBObject("foo.bar", "baz")});
|
collection.insert(obj);
|
}
|
|
@Test(expectedExceptions = IllegalArgumentException.class)
|
public void testDotKeysArrayFail3() {
|
DBCollection collection = _db.getCollection("testdotkeysFail");
|
|
final Map<String, Object> map = new HashMap<String, Object>(1);
|
map.put("foo.bar",2);
|
DBObject obj = new BasicDBObject("x", 1)
|
.append("y", 2)
|
.append("array", new Object[]{map});
|
collection.insert(obj);
|
}
|