Path: redb-route/tests/redb.Route.Tests.Xml/RepositoryBeanReferenceTests.cs
Snapshot: redb-route, 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-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/tests/redb.Route.Tests.Xml/RepositoryBeanReferenceTests.cs
----
using AwesomeAssertions;
using redb.Route.Abstractions;
using redb.Route.Components;
using redb.Route.Core;
using redb.Route.Processors;
using redb.Route.Xml;
namespace redb.Route.Tests.Xml;
///
/// A repository declared as a bean in markup is the one repository="#name" refers to: the name is the registry
/// key as is, for idempotent repositories as for every other reference.
///
public class RepositoryBeanReferenceTests : IAsyncLifetime
{
private readonly RouteContext _context = new();
public Task InitializeAsync() => Task.CompletedTask;
public async Task DisposeAsync()
{
await _context.DisposeAsync();
GC.SuppressFinalize(this);
}
[Fact]
public async Task A_bean_repository_starts_the_route_and_drops_the_repeat()
{
var received = new List