22 lines
588 B
C#
22 lines
588 B
C#
using NATS.Server.LeafNodes;
|
|
|
|
namespace NATS.Server.Tests;
|
|
|
|
public class LeafHubSpokeMappingParityTests
|
|
{
|
|
[Fact]
|
|
public void Leaf_hub_spoke_mapper_round_trips_account_mapping()
|
|
{
|
|
var mapper = new LeafHubSpokeMapper(new Dictionary<string, string>
|
|
{
|
|
["HUB"] = "SPOKE",
|
|
});
|
|
|
|
var outbound = mapper.Map("HUB", "orders.created", LeafMapDirection.Outbound);
|
|
outbound.Account.ShouldBe("SPOKE");
|
|
|
|
var inbound = mapper.Map("SPOKE", "orders.created", LeafMapDirection.Inbound);
|
|
inbound.Account.ShouldBe("HUB");
|
|
}
|
|
}
|