Avro.Test.TestSchema2.testRecord C# (CSharp) Method

testRecord() private method

private testRecord ( ) : void
return void
        public void testRecord()
        {
            String recordJson = "{\"type\":\"record\", \"name\":\"Test\", \"fields\":"
              + "[{\"name\":\"f\", \"type\":\"long\"}]}";
            Schema schema = Schema.Parse(recordJson);

            //RecordSchema record = new RecordSchema(  new GenericData.Record(schema);
            //record.put("f", 11L);
            //check(recordJson, "{\"f\":11}", record, false);
            checkParseError("{\"type\":\"record\"}");
            checkParseError("{\"type\":\"record\",\"name\":\"X\"}");
            checkParseError("{\"type\":\"record\",\"name\":\"X\",\"fields\":\"Y\"}");
            checkParseError("{\"type\":\"record\",\"name\":\"X\",\"fields\":"
                            + "[{\"name\":\"f\"}]}");       // no type
            checkParseError("{\"type\":\"record\",\"name\":\"X\",\"fields\":"
                            + "[{\"type\":\"long\"}]}");    // no name
        }