Azure / Azure/data-api-builder

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

Open
#2,345 0 comments 0 reactions 1 assignee Claimed by @rusamant View on GitHub
testing usability validation
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

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.

```csharp
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.