AK.F1.Timing.Server.Proxy.ProxySessionTest.can_send_a_partial_buffer_snapshot C# (CSharp) Метод

can_send_a_partial_buffer_snapshot() приватный Метод

private can_send_a_partial_buffer_snapshot ( ) : void
Результат void
        public void can_send_a_partial_buffer_snapshot()
        {
            using(var ctx = new TestContext())
            using(var session = new ProxySession(0, ctx.Output))
            {
                var buffer = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                var expected = new byte[] { 6, 7, 8, 9 };

                session.SendAsync(new ByteBufferSnapshot(buffer, 5, 4));

                var actual = new byte[expected.Length];
                Assert.Equal(ctx.Input.Receive(actual), expected.Length);
                Assert.Equal(expected, actual);
                Assert.False(ctx.Input.Poll(PollTimeout, SelectMode.SelectRead));
            }
        }