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

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

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

            converter.FromUInt64(value, actual, offset);

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

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

            Assert.AreEqual(expected, actual);
        }