public virtual void Pipe() { int expected = 3; using (IChannel <int> c = new FuncChannelPipe <int>(new Channel <int>(), new Channel <int>(), p => p)) { Task.Factory.StartNew(() => { Thread.Sleep(Timeblok); c.Write(expected); }); Assert.AreEqual(expected, c.Read()); } }
public virtual void Pipe() { int expected = 3; using (IChannel <int> d = new mq.Channel <int>("test-Pipe2" + Salt)) using (IChannel <int> c = new FuncChannelPipe <int>(new mq.Channel <int>("test-Pipe1" + Salt), d, p => p)) { Task.Factory.StartNew(() => { Thread.Sleep(Timeblok); c.Write(expected); }); Assert.AreEqual(expected, c.Read()); c.Close(); } }