public async Task WriteCommentAsync() { await ExceptionAssert.ThrowsAsync<JsonWriterException>(async () => { MemoryStream ms = new MemoryStream(); CborDataWriter writer = new CborDataWriter(ms); await writer.WriteStartArrayAsync(); await writer.WriteCommentAsync("fail"); }, "Cannot write JSON comment as BSON. Path ''."); }