Path: redb-route/tests/redb.Route.Tests/Expressions/XPathResultTypeTests.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/XPathResultTypeTests.cs
----
using AwesomeAssertions;
using redb.Route.Abstractions;
using redb.Route.Core;
using redb.Route.Expressions;
using XPathExpr = redb.Route.Expressions.XPathExpression;
namespace redb.Route.Tests.Expressions;
///
/// The XPath-level result type — Camel's resultQName — as distinct from the CLR type the
/// caller converts to. String, number and boolean are XPath's own coercions, so the engine
/// performs them; node-set and node differ only in how many matches survive.
///
public class XPathResultTypeTests
{
private const string Order = """
07abc
""";
private static IExchange Exchange() => new Exchange(new Message(Order));
// ── String ──
[Fact]
public void String_keeps_the_text_instead_of_smart_parsing_it()
{
var asNodeSet = new XPathExpr("/order/discount").Evaluate