AjErl.Tests.Communication.InputChannelTests.ReadShortInteger C# (CSharp) Method

ReadShortInteger() private method

private ReadShortInteger ( ) : void
return void
        public void ReadShortInteger()
        {
            MemoryStream stream = new MemoryStream();
            OutputChannel output = new OutputChannel(new BinaryWriter(stream));
            short sh = short.MaxValue;
            output.Write(sh);
            stream.Seek(0, SeekOrigin.Begin);

            InputChannel channel = new InputChannel(new BinaryReader(stream));

            Assert.AreEqual(sh, channel.Read());
        }