Path: redb-route/tests/redb.Route.Tests/Core/BodyTextTests.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/BodyTextTests.cs
----
using System.Text.Json.Nodes;
using AwesomeAssertions;
using redb.Route.Core;
namespace redb.Route.Tests.Core;
/// The text a producer sends for a body it has no wire form for: the body's own text, never its type name.
public class BodyTextTests
{
private sealed class NoText { }
private sealed record WithText(int Id);
[Theory]
[MemberData(nameof(Texted))]
public void A_body_with_a_text_form_of_its_own_is_its_text(object body, string text)
=> BodyText.Of(body).Should().Be(text);
public static TheoryData