public void TestToString() { var wrapper = new BsonDocumentWrapper(new BsonDocument("x", 1)); Assert.AreEqual(false, wrapper.IsMaterialized); var expected = "{ 'x' : 1 }".Replace("'", "\""); var s = wrapper.ToString(); Assert.AreEqual(false, wrapper.IsMaterialized); // ToString just serializes, doesn't materialize Assert.AreEqual(expected, s); }