System.PrivateUri.Tests.UriTests.TestHexMethods C# (CSharp) Méthode

TestHexMethods() private méthode

private TestHexMethods ( ) : void
Résultat void
        public static void TestHexMethods()
        {
            char  testChar = 'e';
            Assert.True(Uri.IsHexDigit(testChar));
            Assert.Equal(14, Uri.FromHex(testChar));

            string hexString = Uri.HexEscape(testChar);
            Assert.Equal(hexString, "%65");

            int index = 0;
            Assert.True(Uri.IsHexEncoding(hexString, index));
            Assert.Equal(testChar, Uri.HexUnescape(hexString, ref index));
        }