diff --git a/src/Custom.Build.props b/src/Custom.Build.props index 6f3833a7c4..ff19f9735b 100644 --- a/src/Custom.Build.props +++ b/src/Custom.Build.props @@ -14,7 +14,7 @@ - 10.0.10 + 10.0.11 Disable diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 55a637e359..ea2ef2af6f 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -71,7 +71,7 @@ - + @@ -94,7 +94,6 @@ - diff --git a/src/ServiceControl.Infrastructure.Tests/ApprovalFiles/RouteManifestEntrySerializationTests.Response_wraps_roles_and_routes_under_pinned_field_names.approved.txt b/src/ServiceControl.Infrastructure.Tests/ApprovalFiles/RouteManifestEntrySerializationTests.Response_wraps_roles_and_routes_under_pinned_field_names.approved.txt new file mode 100644 index 0000000000..92fd36a197 --- /dev/null +++ b/src/ServiceControl.Infrastructure.Tests/ApprovalFiles/RouteManifestEntrySerializationTests.Response_wraps_roles_and_routes_under_pinned_field_names.approved.txt @@ -0,0 +1 @@ +{"roles":["admin"],"routes":[{"method":"GET","url_template":"/api/errors"}]} \ No newline at end of file diff --git a/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.Response_wraps_roles_and_routes_under_pinned_field_names.verified.txt b/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.Response_wraps_roles_and_routes_under_pinned_field_names.verified.txt deleted file mode 100644 index ed2dd257ef..0000000000 --- a/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.Response_wraps_roles_and_routes_under_pinned_field_names.verified.txt +++ /dev/null @@ -1,11 +0,0 @@ -{ - roles: [ - admin - ], - routes: [ - { - method: GET, - url_template: /api/errors - } - ] -} \ No newline at end of file diff --git a/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.cs b/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.cs index 3d72610362..2c2efe9a11 100644 --- a/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.cs +++ b/src/ServiceControl.Infrastructure.Tests/Auth/RouteManifestEntrySerializationTests.cs @@ -2,10 +2,9 @@ namespace ServiceControl.Infrastructure.Tests.Auth; using System.Text.Json; -using System.Threading.Tasks; using NUnit.Framework; +using Particular.Approvals; using ServiceControl.Infrastructure.Auth; -using VerifyNUnit; [TestFixture] class RouteManifestEntrySerializationTests @@ -30,12 +29,12 @@ public void Emits_snake_case_field_names_even_under_a_camelCase_policy() // Same contract as above, but for the response wrapper: roles are reported once at the top level, // not duplicated onto every route entry. [Test] - public Task Response_wraps_roles_and_routes_under_pinned_field_names() + public void Response_wraps_roles_and_routes_under_pinned_field_names() { var json = JsonSerializer.Serialize( new MyRoutesResponse(["admin"], [new RouteManifestEntry("GET", "/api/errors")]), new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); - return Verifier.VerifyJson(json); + Approver.Verify(json); } } diff --git a/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj b/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj index 7664d8aa63..1980f88aef 100644 --- a/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj +++ b/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file