public async Task applies_lookups_to_senders() { theSettings.SendTo("fake://one"); var lookups = new UriAliasLookup(new IUriLookup[0]); lookups.SetAlias("fake://one", "tcp://server:2222"); await theSettings.ApplyLookups(lookups); theSettings.KnownSubscribers.Single() .Uri.ShouldBe("tcp://server:2222".ToUri()); }
public void has_an_alias() { var fake = "fake://one".ToUri(); var address = new SubscriberAddress(fake); var lookups = new UriAliasLookup(new IUriLookup[0]); var real = "real://one".ToUri(); lookups.SetAlias(fake, real); address.ReadAlias(lookups); address.Uri.ShouldBe(real); address.Alias.ShouldBe(fake); }
public async Task applies_lookups_to_listeners_happy_path() { theSettings.ListenForMessagesFrom("fake://one").MaximumParallelization(3); var lookups = new UriAliasLookup(new IUriLookup[0]); lookups.SetAlias("fake://one", "tcp://localhost:2222/incoming"); await theSettings.ApplyLookups(lookups); theSettings.Lightweight.Port.ShouldBe(2222); theSettings.Lightweight.Queues.Has("incoming").ShouldBeTrue(); theSettings.Lightweight.Queues["incoming"].Parallelization.ShouldBe(3); }