Пример #1
0
        public void Appends_Single_Byte_Integer()
        {
            var expectedResult = new byte[] {
                0x24,
                0x00, 0x01, 0x36, 0x16
            };
            var builder = new PduWriter();

            byte testValue = 0x24;
            builder.WriteByte(testValue);
            builder.WriteInteger(79382);
            var buffer = builder.GetBytes();

            CollectionAssert.AreEqual(expectedResult, buffer);
        }
Пример #2
0
        public void Writes_Single_Byte_Integer()
        {
            var expectedResult = new byte[] {
                0x42
            };
            var builder = new PduWriter();

            byte testValue = 66;
            builder.WriteByte(testValue);
            var buffer = builder.GetBytes();

            CollectionAssert.AreEqual(expectedResult, buffer);
        }