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

WriteDouble() private method

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

            channel.Write(123.45);

            stream.Seek(0, SeekOrigin.Begin);

            BinaryReader reader = new BinaryReader(stream);

            Assert.AreEqual((byte)Types.Double, reader.ReadByte());
            Assert.AreEqual(123.45, reader.ReadDouble());
            Assert.AreEqual(-1, reader.PeekChar());

            reader.Close();
        }