Ejemplo n.º 1
0
        public void LittleEndianByteArray_Roundtrip()
        {
            var bytes = new byte[] { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
            var guid  = GuidFactory.FromLittleEndianByteArray(bytes);

            Assert.Equal(bytes, guid.ToByteArray());
        }
Ejemplo n.º 2
0
        public void FromLittleEndianByteArray_ReturnsGuidInMicrosoftOrder()
        {
            var bytes = new byte[] { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
            var guid  = GuidFactory.FromLittleEndianByteArray(bytes);

            Assert.Equal("33221100-5544-7766-8899-aabbccddeeff", guid.ToString("D"));
        }