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

WriteNull() private method

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

            channel.Write(null);

            stream.Seek(0, SeekOrigin.Begin);

            BinaryReader reader = new BinaryReader(stream);

            Assert.AreEqual((byte)Types.Null, reader.ReadByte());
            Assert.AreEqual(-1, reader.PeekChar());

            reader.Close();
        }