Exemple #1
0
        public void Reads_Single_Byte_Integer()
        {
            var buffer = new byte[] { 0xc4 };

            var reader = new PduReader(buffer);

            Assert.AreEqual(196, reader.ReadByte());
        }
Exemple #2
0
        public void Throw_On_Read_Byte_With_Insufficient_Bytes()
        {
            var buffer = new byte[0];

            var reader = new PduReader(buffer);

            Assert.Throws(typeof(InvalidOperationException), () => reader.ReadByte(), "Buffer does not contain 1 bytes.");
        }