Path: redb-route/tests/redb.Route.Tests.Amqp/AckModeOptionsTests.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.Amqp/AckModeOptionsTests.cs ---- using AwesomeAssertions; using redb.Route.Core; using redb.Route.Amqp; namespace redb.Route.Tests.Amqp; /// /// ackMode, the one option that says when a consumer settles what it received (manual: after the route, /// auto: on receipt). The connector's former option is refused with its replacement named. /// public class AckModeOptionsTests { private static AmqpEndpointOptions Bind(params (string Key, string Value)[] parameters) { var options = new AmqpEndpointOptions(); options.BindFromUri(parameters.ToDictionary(p => p.Key, p => p.Value)); return options; } [Fact] public void The_default_is_manual() => new AmqpEndpointOptions().AckMode.Should().Be(AckMode.Manual); [Fact] public void Auto_binds_from_the_uri() => Bind(("ackMode", "auto")).AckMode.Should().Be(AckMode.Auto); [Fact] public void The_former_option_is_refused_with_its_replacement() { var act = () => Bind(("autoAccept", "false")); act.Should().Throw().WithMessage("*'autoAccept' is replaced by 'ackMode'*"); } }