public void TestInsertAt() { var wrapper = new BsonDocumentWrapper(new BsonDocument()); Assert.AreEqual(false, wrapper.IsMaterialized); wrapper.InsertAt(0, new BsonElement("x", 1)); Assert.AreEqual(true, wrapper.IsMaterialized); Assert.AreEqual(1, wrapper.ElementCount); Assert.AreEqual("x", wrapper.GetElement(0).Name); Assert.AreEqual(new BsonInt32(1), wrapper[0]); }