Example #1
0
        public void WriteComment()
        {
            ExceptionAssert.Throws <JsonWriterException>(() =>
            {
                MemoryStream ms       = new MemoryStream();
                BsonDataWriter writer = new BsonDataWriter(ms);

                writer.WriteStartArray();
                writer.WriteComment("fail");
            }, "Cannot write JSON comment as BSON. Path ''.");
        }