public void SendMultipartBytesTest()
        {
            int count = 0;

            OutgoingSocketMock socket = new OutgoingSocketMock((ref Msg msg, TimeSpan timeout, bool more) =>
            {
                if (count == 0)
                {
                    Assert.AreEqual(SendReceiveConstants.InfiniteTimeout, timeout);
                    Assert.AreEqual(1, msg.Data.Length);
                    Assert.AreEqual(1, msg.Data[0]);
                    Assert.IsTrue(more);
                    count++;
                }
                else
                {
                    Assert.AreEqual(SendReceiveConstants.InfiniteTimeout, timeout);
                    Assert.AreEqual(1, msg.Data.Length);
                    Assert.AreEqual(2, msg.Data[0]);
                    Assert.IsFalse(more);
                    count++;
                }

                return(true);
            });

            socket.SendMultipartBytes(new byte[] { 1 }, new byte[] { 2 });
            Assert.AreEqual(2, count);
        }
        public void SendMultipartBytesTest()
        {
            int count = 0;

            OutgoingSocketMock socket = new OutgoingSocketMock((ref Msg msg, TimeSpan timeout, bool more) =>
            {
                if (count == 0)
                {
                    Assert.AreEqual(SendReceiveConstants.InfiniteTimeout, timeout);
                    Assert.AreEqual(1, msg.Data.Length);
                    Assert.AreEqual(1, msg.Data[0]);
                    Assert.IsTrue(more);
                    count++;
                }
                else
                {
                    Assert.AreEqual(SendReceiveConstants.InfiniteTimeout, timeout);
                    Assert.AreEqual(1, msg.Data.Length);
                    Assert.AreEqual(2, msg.Data[0]);
                    Assert.IsFalse(more);
                    count++;
                }

                return true;
            });

            socket.SendMultipartBytes(new byte[] { 1 }, new byte[] { 2 });
            Assert.AreEqual(2, count);
        }