Files
natsdotnet/tests/NATS.Server.Clustering.Tests/Routes/RouteCompressionTests.cs
Joseph Doherty 615752cdc2 refactor: extract NATS.Server.Clustering.Tests project
Move 29 clustering/routing test files from NATS.Server.Tests to a
dedicated NATS.Server.Clustering.Tests project. Update namespaces,
replace private GetFreePort/ReadUntilAsync helpers with TestUtilities
calls, and extract TestServerFactory/ClusterTestServer to TestUtilities
to fix cross-project reference from JetStreamStartupTests.
2026-03-12 15:31:58 -04:00

17 lines
458 B
C#

using System.Text;
using NATS.Server.Routes;
namespace NATS.Server.Clustering.Tests;
public class RouteCompressionTests
{
[Fact]
public void Route_payload_round_trips_through_compression_codec()
{
var payload = Encoding.UTF8.GetBytes(new string('x', 512));
var compressed = RouteCompressionCodec.Compress(payload);
var restored = RouteCompressionCodec.Decompress(compressed);
restored.ShouldBe(payload);
}
}