Skip to content

Commit

Permalink
test: assert equivalent differences
Browse files Browse the repository at this point in the history
- Create one subfolder per test case
- Convert all JSON specs to YAML
- Create diff.json filew with the expected differences
- Replace all test cases with this new validation
  • Loading branch information
NextFire committed Jul 11, 2024
1 parent cff4ba8 commit 4ac2289
Show file tree
Hide file tree
Showing 261 changed files with 5,455 additions and 4,742 deletions.
8 changes: 7 additions & 1 deletion src/Criteo.OpenApi.Comparator.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Criteo.OpenApi.Comparator.Cli
{
Expand Down Expand Up @@ -114,7 +115,12 @@ private static void DisplayOutput(IEnumerable<ComparisonMessage> differences, Ou
{
if (outputFormat == OutputFormat.Json)
{
Console.WriteLine(JsonSerializer.Serialize(differences, new JsonSerializerOptions { WriteIndented = true }));
var serializerOptions = new JsonSerializerOptions
{
WriteIndented = true,
Converters = { new JsonStringEnumConverter() }
};
Console.WriteLine(JsonSerializer.Serialize(differences, serializerOptions));
return;
}

Expand Down
92 changes: 0 additions & 92 deletions src/Criteo.OpenApi.Comparator.UTest/OpenApiEnumDirectionTests.cs

This file was deleted.

Loading

0 comments on commit 4ac2289

Please sign in to comment.