Path: redb-route/tests/redb.Route.Tests/Expressions/MemberNameCaseTests.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/Expressions/MemberNameCaseTests.cs
----
using AwesomeAssertions;
using redb.Route.Abstractions;
using redb.Route.Core;
using redb.Route.Expressions;
namespace redb.Route.Tests.Expressions;
///
/// A path step names a member case-insensitively, and the exact case wins when several members differ only in case. A
/// redb object has both Id and the JSON-named id: ${body.Id} failed with "Ambiguous match found".
///
[Collection("ExpressionResolver")]
public class MemberNameCaseTests : IDisposable
{
public MemberNameCaseTests() => ExpressionResolver.ClearAllCaches();
public void Dispose()
{
ExpressionResolver.ClearAllCaches();
GC.SuppressFinalize(this);
}
private static object? Evaluate(string expression, object body)
=> new StringExpression(expression).Evaluate