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