data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

Update SerializationDeserialization tests to validate field names and not field count.

Open seantleonard opened this issue 1 year ago • 0 comments

Examples in SerializationDeserialization tests validate field count with magic numbers. If this number were to change and fail tests, we have no way of knowing which fields the tests were checking for.

 Assert.AreEqual(fields, 8);  // what are the 8 fields??
 Assert.AreEqual(fields, 5); // what are the 5 fields?

https://github.com/Azure/data-api-builder/blob/e8d9fcb9ac1c2aa8b47808b0a658a09e092545e0/src/Service.Tests/Unittests/SerializationDeserializationTests.cs#L428-L445

seantleonard avatar Aug 21 '24 21:08 seantleonard