Path: redb-route/tests/redb.Route.Tests.Soap/SoapConcurrencyLimitOptionsTests.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.Soap/SoapConcurrencyLimitOptionsTests.cs ---- using AwesomeAssertions; using redb.Route.Core; using redb.Route.Soap; using redb.Route.Soap.Fluent; using Xunit; namespace redb.Route.Tests.Soap; /// /// Admission-limit options on the SOAP consumer. /// The shed mechanics live in the shared host and are e2e-proved there and on the HTTP /// connector; here the contract is that SOAP carries the same quartet: URI → options → the /// consumer's RegisterRoute call. /// public sealed class SoapConcurrencyLimitOptionsTests { [Fact] public void UriAndDsl_CarryTheOptions() { var built = Route.Soap.Fluent.Soap.Listen("/svc/orders") .Port(4090) .MaxConcurrentRequests(3, queue: 9) .RejectStatusCode(503) .RetryAfterSeconds(2) .Build(); built.Should().Contain("maxConcurrentRequests=3") .And.Contain("requestQueueLimit=9") .And.Contain("rejectStatusCode=503") .And.Contain("retryAfterSeconds=2"); var endpoint = (SoapEndpoint)new SoapComponent().CreateEndpoint(EndpointUriParser.Parse(built)); endpoint.SoapOptions.MaxConcurrentRequests.Should().Be(3); endpoint.SoapOptions.RequestQueueLimit.Should().Be(9); endpoint.SoapOptions.RejectStatusCode.Should().Be(503); endpoint.SoapOptions.RetryAfterSeconds.Should().Be(2); } [Fact] public void QueueWithoutLimit_FailsLoud() { var uri = EndpointUriParser.Parse("soap:/svc/x?host=127.0.0.1&port=4091&requestQueueLimit=5"); var act = () => new SoapComponent().CreateEndpoint(uri); act.Should().Throw().WithMessage("*requestQueueLimit*maxConcurrentRequests*"); } }