public void ApplyULongWithLittleEndianShouldNoOp()
        {
            const ulong input = 12;

            var result = EndianessConverter.ApplyUint64(ByteOrder.LittleEndian, input);

            Assert.AreEqual(input, result);
        }
        public void ApplyULongWithBigEndianShouldReverseBytes()
        {
            const ulong input = 12;

            var result = EndianessConverter.ApplyUint64(ByteOrder.BigEndian, input);

            ulong expected = BitConverter.ToUInt64(BitConverter.GetBytes(input).Reverse().ToArray(), 0);

            Assert.AreEqual(expected, result);
        }
        public void ShouldPutUInt64BigEndian()
        {
            const ulong value = ulong.MaxValue - 1;
            const int   index = 0;

            _directBuffer.Uint64PutBigEndian(index, value);

            var expected = EndianessConverter.ApplyUint64(ByteOrder.BigEndian, value);

            Assert.AreEqual(expected, *(ulong *)(_pBuffer + index));
        }
        public void ShouldGetUInt64BigEndian()
        {
            const ulong value = ulong.MaxValue - 1;
            const int   index = 0;
            var         bytes = BitConverter.GetBytes(value);

            Array.Copy(bytes, 0, _buffer, index, 8);

            var result = _directBuffer.Uint64GetBigEndian(index);

            var expected = EndianessConverter.ApplyUint64(ByteOrder.BigEndian, value);

            Assert.AreEqual(expected, result);
        }