protected virtual void BuildRemoteBus(LocalRemoteTestScenario scenario) { _remoteConfigurator.ChangeSettings(x => { x.EndpointCache = scenario.EndpointCache; }); _remoteConfigurator.AddSubscriptionObserver((bus, coordinator) => { _remoteLoopback = new SubscriptionLoopback(bus, coordinator); return(_remoteLoopback); }); scenario.RemoteBus = _remoteConfigurator.CreateServiceBus(); }
public override ILocalRemoteTestScenario Build() { IEndpointFactory endpointFactory = BuildEndpointFactory(); var scenario = new LocalRemoteTestScenario(endpointFactory); BuildLocalBus(scenario); BuildRemoteBus(scenario); _localLoopback.SetTargetCoordinator(_remoteLoopback.Router); _remoteLoopback.SetTargetCoordinator(_localLoopback.Router); return(scenario); }