Files
natsdotnet/tests/NATS.Server.Gateways.Tests/GatewayAdvancedRemapRuntimeTests.cs
Joseph Doherty 9972b74bc3 refactor: extract NATS.Server.Gateways.Tests project
Move 25 gateway-related test files from NATS.Server.Tests into a
dedicated NATS.Server.Gateways.Tests project. Update namespaces,
replace private ReadUntilAsync with SocketTestHelper from TestUtilities,
inline TestServerFactory usage, add InternalsVisibleTo, and register
the project in the solution file. All 261 tests pass.
2026-03-12 15:10:50 -04:00

20 lines
601 B
C#

using NATS.Server.Gateways;
namespace NATS.Server.Gateways.Tests;
public class GatewayAdvancedRemapRuntimeTests
{
[Fact]
public void Transport_internal_reply_and_loop_markers_never_leak_to_client_visible_subjects()
{
const string clientReply = "_INBOX.123";
var nested = ReplyMapper.ToGatewayReply(
ReplyMapper.ToGatewayReply(clientReply, "CLUSTER-A"),
"CLUSTER-B");
ReplyMapper.TryRestoreGatewayReply(nested, out var restored).ShouldBeTrue();
restored.ShouldBe(clientReply);
restored.ShouldNotStartWith("_GR_.");
}
}