Path: redb-route/tests/redb.Route.Tests.Core/RedbObjectBodyExpressionTests.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.Core/RedbObjectBodyExpressionTests.cs ---- using redb.Core.Models.Entities; using redb.Route.Core; using redb.Route.Expressions; namespace redb.Route.Tests.Core; /// /// A body carries both Id and the JSON-named id: ${body.Id} used to /// fail with "Ambiguous match found" because the member lookup ignored case. /// public sealed class RedbObjectBodyExpressionTests { public sealed class SensorProps { public string Room { get; set; } = ""; } private static object? Evaluate(string expression) { var body = new RedbObject { Props = new SensorProps { Room = "kitchen" } }; body.Id = 1021; return new StringExpression(expression).Evaluate(new Exchange(new Message(body))); } [Theory] [InlineData("${body.Id}")] [InlineData("${body.id}")] public void The_id_reads_in_either_spelling(string expression) => Evaluate(expression).Should().Be(1021L); [Fact] public void The_props_read_through_the_body() => Evaluate("${body.Props.Room}").Should().Be("kitchen"); }