public void ReceiveFrameBytesSingleFrame() { var expected = m_socket.PushFrame("Hello"); byte[] actual = m_socket.ReceiveFrameBytes(); Assert.True(actual.SequenceEqual(expected)); Assert.Equal(SendReceiveConstants.InfiniteTimeout, m_socket.LastTimeout); // The buffer is copied into a new array Assert.NotSame(expected, actual); }
private byte[] PushFrame([NotNull] string hello) { byte[] expected = Encoding.ASCII.GetBytes(hello); m_socket.PushFrame(expected); return(expected); }