AjErl.Tests.Communication.OutputChannelTests.WriteDecimal C# (CSharp) Метод

WriteDecimal() приватный Метод

private WriteDecimal ( ) : void
Результат void
        public void WriteDecimal()
        {
            MemoryStream stream = new MemoryStream();
            OutputChannel channel = new OutputChannel(new BinaryWriter(stream));

            decimal dc = 12.34m;

            channel.Write(dc);

            stream.Seek(0, SeekOrigin.Begin);

            BinaryReader reader = new BinaryReader(stream);

            Assert.AreEqual((byte)Types.Decimal, reader.ReadByte());
            Assert.AreEqual(dc, reader.ReadDecimal());
            Assert.AreEqual(-1, reader.PeekChar());

            reader.Close();
        }