コード例 #1
0
        public void Test_FromUInt32(uint value, int offset, bool useNbo, byte[] expected)
        {
            var converter = new DefaultConverter();
            var actual    = new byte[11];

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

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void Test_FromUInt32_NoNboSpecified(uint value, int offset, byte[] expected)
        {
            var converter = new DefaultConverter();
            var actual    = new byte[11];

            converter.FromUInt32(value, actual, offset);

            Assert.Equal(expected, actual);
        }
コード例 #3
0
        public void Test_FromUInt32()
        {
            var converter = new DefaultConverter();
            var actual    = new byte[11];

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

            Assert.AreEqual(expected, actual);
        }