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()); }
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")); }