public void TestReceive() { DoubleChannelClient client = new DoubleChannelClient(); client.Connect("localhost", port); byte[] bytes1 = client.ReceiveByChannel1(); byte[] bytes2 = client.ReceiveByChannel2(); string msg1 = Encoding.Default.GetString(bytes1); string msg2 = Encoding.Default.GetString(bytes2); Assert.AreEqual("This is channel1", msg1); Assert.AreEqual("This is channel2", msg2); client.Close(); }