You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2021/02/18 01:01:30 UTC

[GitHub] [avro] tom-j-irvine commented on a change in pull request #1070: AVRO-2633 - csharp include schema doc

tom-j-irvine commented on a change in pull request #1070:
URL: https://github.com/apache/avro/pull/1070#discussion_r578050603



##########
File path: lang/csharp/src/apache/test/Schema/SchemaTests.cs
##########
@@ -69,8 +69,12 @@ public class SchemaTests
             typeof(SchemaParseException), Description = "No fields")]
         [TestCase("{\"type\":\"record\",\"name\":\"LongList\", \"fields\": \"hi\"}",
             typeof(SchemaParseException), Description = "Fields not an array")]
-        [TestCase("[{\"type\": \"record\",\"name\": \"Test\",\"namespace\":\"ns1\",\"fields\": [{\"name\": \"f\",\"type\": \"long\"}]}," + 
+        [TestCase("[{\"type\": \"record\",\"name\": \"Test\",\"namespace\":\"ns1\",\"fields\": [{\"name\": \"f\",\"type\": \"long\"}]}," +
                    "{\"type\": \"record\",\"name\": \"Test\",\"namespace\":\"ns2\",\"fields\": [{\"name\": \"f\",\"type\": \"long\"}]}]")]
+
+        // Doc
+        [TestCase("{\"type\": \"record\",\"name\": \"Test\",\"doc\": \"Test Doc\",\"fields\": [{\"name\": \"f\",\"type\": \"long\"}]}")]
+

Review comment:
       Excellent point.  I updated the test to use your round trip logic.  As far as empty strings, my original code would have eliminated them from the output, but since the test was written expecting them, I changed it to preserve the doc attribute when specified; empty or not.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org