System.Net.Tests.WebUtilityTests.UrlDecodeToBytes_TestData C# (CSharp) Method

UrlDecodeToBytes_TestData() public static method

public static UrlDecodeToBytes_TestData ( ) : IEnumerable
return IEnumerable
        public static IEnumerable<object[]> UrlDecodeToBytes_TestData()
        {
            foreach (var tuple in UrlDecode_SharedTestData())
            {
                byte[] input = Encoding.UTF8.GetBytes(tuple.Item1);
                byte[] output = Encoding.UTF8.GetBytes(tuple.Item2);
                yield return new object[] { input, 0, input.Length, output };
            }

            // Ranges
            byte[] bytes = new byte[] { 97, 37, 67, 50, 37, 56, 48, 98 };
            yield return new object[] { bytes, 1, 6, new byte[] { 194, 128 } };
            yield return new object[] { bytes, 7, 1, new byte[] { 98 } };
            yield return new object[] { bytes, 0, 0, new byte[0] };
            yield return new object[] { bytes, 8, 0, new byte[0] };

            // Empty
            yield return new object[] { new byte[0], 0, 0, new byte[0] };

            // Null
            yield return new object[] { null, 0, 0, null };
            yield return new object[] { null, int.MinValue, 0, null };
            yield return new object[] { null, int.MaxValue, 0, null };
        }