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

WriteChar() private method

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

            char ch = 'a';

            channel.Write(ch);

            stream.Seek(0, SeekOrigin.Begin);

            BinaryReader reader = new BinaryReader(stream);

            Assert.AreEqual((byte)Types.Character, reader.ReadByte());
            Assert.AreEqual(ch, reader.ReadChar());
            Assert.AreEqual(-1, reader.PeekChar());

            reader.Close();
        }