Path: redb-identity/tests/redb.Identity.Tests/Routes/UniqueViolationMetricCallSitesTests.cs
Snapshot: redb-identity, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-identity
Page: https://redbase.app/src/dev-2026-12-06/redb-identity/tests/redb.Identity.Tests/Routes/UniqueViolationMetricCallSitesTests.cs
----
using System.Diagnostics.Metrics;
using AwesomeAssertions;
using Microsoft.Extensions.DependencyInjection;
using redb.Identity.Core.Metrics;
using redb.Identity.Core.Routes.Processors;
using redb.Route.Core;
using Xunit;
namespace redb.Identity.Tests.Routes;
///
/// The processors that catch a unique violation themselves and answer the caller with a conflict
/// count it on identity.unique_violation as the builder-level handlers do. The list below is
/// the whole of them; a processor added to it or taken from it changes what the metric means.
///
public class UniqueViolationMetricCallSitesTests
{
private static readonly string ProcessorsFolder = LocateProcessorsFolder();
public static IEnumerable