yanivru commented on a change in pull request #1597:
URL: https://github.com/apache/avro/pull/1597#discussion_r841119396



##########
File path: lang/csharp/src/apache/test/Schema/SchemaTests.cs
##########
@@ -417,6 +595,19 @@ public void TestFixedDoc(string s, string expectedDoc)
             Assert.AreEqual(expectedDoc, fs.Documentation);
         }
 
+        [TestCase]
+        public void TestFixedCreation()
+        {
+            string s = 
@"{""type"":""fixed"",""name"":""fixedName"",""namespace"":""space"",""aliases"":[""space.fixedOldName""],""size"":10}";
+
+            FixedSchema fixedSchema = FixedSchema.Create("fixedName", 10, 
"space", new[] { "fixedOldName" }, null);
+
+            Assert.AreEqual("fixedName", fixedSchema.Name);
+            Assert.AreEqual("space.fixedName", fixedSchema.Fullname);
+            Assert.AreEqual(10, fixedSchema.Size);
+            Assert.AreEqual(s, fixedSchema.ToString());
+        }
+

Review comment:
       Just noticed there already is a CreateMap in MapSchema type. So I will 
remove the create. It's not consistent with other schema types (which has 
Create). But writing the type each time seems redundant, so leaving them 
"Create" (Seems like MapSchema is not consistent in other areas, like exception 
types). What do you think?
   
   Anyway, tests added




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to