public void PublishOnHost_ReceiveOnNonHost() { NetMqTransport transportWithoutHost = new NetMqTransport("tcp://localhost:9990", "tcp://localhost:9991", false); transportWithoutHost.Serializer = new JsonNetSerializer(); transportWithoutHost.Start(); ManualResetEvent mre = new ManualResetEvent(false); transportWithoutHost.MessageReceived += (sender, e) => { mre.Set(); }; _transportWithHost.Publish(new MessageWrapper()); bool eventFired = mre.WaitOne(new TimeSpan(0, 0, 5)); transportWithoutHost.Stop(); Assert.True(eventFired); }
public void Setup() { _transportWithHost = new NetMqTransport("tcp://localhost:9990", "tcp://localhost:9991", true); _transportWithHost.Serializer = new JsonNetSerializer(); _transportWithHost.Start(); }