Files
natsdotnet/tests/NATS.Server.Gateways.Tests/Gateways/GatewayInterestOnlyParityTests.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

18 lines
588 B
C#

using NATS.Server.Gateways;
using NATS.Server.Subscriptions;
namespace NATS.Server.Gateways.Tests;
public class GatewayInterestOnlyParityTests
{
[Fact]
public void Gateway_interest_only_mode_forwards_only_subjects_with_remote_interest()
{
using var subList = new SubList();
subList.ApplyRemoteSub(new RemoteSubscription("orders.*", null, "gw1", "A"));
GatewayManager.ShouldForwardInterestOnly(subList, "A", "orders.created").ShouldBeTrue();
GatewayManager.ShouldForwardInterestOnly(subList, "A", "payments.created").ShouldBeFalse();
}
}