예제 #1
0
        public void GuidToStringWillBeHexadecimalWhenConstructedFromHexadecimal()
        {
            //Retain hex formatting if parsed from hex format, to align with previous behavior of this type as much as possible

            var guid = new GUIDTYPE("{00000000-0000-0000-0000-000000000000}");

            Assert.AreEqual("{00000000-0000-0000-0000-000000000000}", guid.ToString());
        }
예제 #2
0
        public void GuidToStringWillBeZeroIfConstructedFromZero()
        {
            /*
             * From Intuit's documentation:
             * A GUIDTYPE value can be zero (0), or it can take the form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} where X is a hexadecimal digit. For example: {6B063959-81B0-4622-85D6-F548C8CCB517}
             *
             * Zero requires special handling
             */

            var guid = new GUIDTYPE("0");

            Assert.AreEqual("0", guid.ToString());
        }