System.PrivateUri.Tests.UriTests.TestHexMethods C# (CSharp) Method

TestHexMethods() private method

private TestHexMethods ( ) : void
return 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));
        }