Пример #1
0
        public void Test_FromInt32(int value, int offset, bool useNbo, byte[] expected)
        {
            var converter = new DefaultConverter();
            var actual    = new byte[11];

            converter.FromInt32(value, ref actual, offset, useNbo);

            Assert.Equal(expected, actual);
        }
Пример #2
0
        public void Test_FromInt32_NoNboSpecified(int value, int offset, byte[] expected)
        {
            var converter = new DefaultConverter();
            var actual    = new byte[11];

            converter.FromInt32(value, actual, offset);

            Assert.Equal(expected, actual);
        }
Пример #3
0
        public void Test_FromInt32()
        {
            var converter = new DefaultConverter();
            var actual    = new byte[11];

            converter.FromInt32(5, actual, 3);
            var expected = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00 };

            Assert.AreEqual(expected, actual);
        }