示例#1
0
        public void TestClientSend(int channel)
        {
            byte[]              array   = new byte[10];
            const int           offset  = 2;
            const int           count   = 5;
            ArraySegment <byte> segment = new ArraySegment <byte>(array, offset, count);

            middleware.ClientSend(channel, segment);

            inner.Received(1).ClientSend(channel, Arg.Is <ArraySegment <byte> >(x => x.Array == array && x.Offset == offset && x.Count == count));
            inner.Received(0).ClientSend(Arg.Is <int>(x => x != channel), Arg.Any <ArraySegment <byte> >());
        }