示例#1
0
    public void WriteConstructor()
    {
      ExceptionAssert.Throws<JsonWriterException>("Cannot write JSON constructor as BSON. Path ''.",
      () =>
      {
        MemoryStream ms = new MemoryStream();
        BsonWriter writer = new BsonWriter(ms);

        writer.WriteStartArray();
        writer.WriteStartConstructor("fail");
      });
    }