AjErl.Tests.Communication.OutputChannelTests.WriteLongInteger C# (CSharp) Method

WriteLongInteger() private method

private WriteLongInteger ( ) : void
return void
        public void WriteLongInteger()
        {
            MemoryStream stream = new MemoryStream();
            OutputChannel channel = new OutputChannel(new BinaryWriter(stream));

            long ln = 123;

            channel.Write(ln);

            stream.Seek(0, SeekOrigin.Begin);

            BinaryReader reader = new BinaryReader(stream);

            Assert.AreEqual((byte)Types.Long, reader.ReadByte());
            Assert.AreEqual(ln, reader.ReadInt64());
            Assert.AreEqual(-1, reader.PeekChar());

            reader.Close();
        }