Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<PackageVersion Include="System.Reflection.MetadataLoadContext" Version="$(RuntimeFrameworkVersion)" />
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="$(RuntimeFrameworkVersion)" />
<PackageVersion Include="Validar.Fody" Version="1.9.0" />
<PackageVersion Include="Verify.NUnit" Version="31.20.0" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.3.0" />
</ItemGroup>
<ItemGroup Label="Versions to pin transitive references">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"roles":["admin"],"routes":[{"method":"GET","url_template":"/api/errors"}]}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit.Analyzers" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Verify.NUnit" />
<PackageReference Include="Particular.Approvals" />
</ItemGroup>

</Project>