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