public void WriteComment() { ExceptionAssert.Throws <JsonWriterException>(() => { MemoryStream ms = new MemoryStream(); CborDataWriter writer = new CborDataWriter(ms); writer.WriteStartArray(); writer.WriteComment("fail"); }, "Cannot write JSON comment as BSON. Path ''."); }