System.Globalization.Tests.IdnMappingGetAsciiTests.GetAscii_Invalid C# (CSharp) Method

GetAscii_Invalid() public static method

public static GetAscii_Invalid ( IdnMapping idnMapping, string unicode, int index, int count, Type exceptionType ) : void
idnMapping IdnMapping
unicode string
index int
count int
exceptionType Type
return void
        public static void GetAscii_Invalid(IdnMapping idnMapping, string unicode, int index, int count, Type exceptionType)
        {
            if (unicode == null || index + count == unicode.Length)
            {
                if (unicode == null || index == 0)
                {
                    Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode));
                }
                Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index));
            }
            Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index, count));
        }
    }

Same methods

IdnMappingGetAsciiTests::GetAscii_Invalid ( string unicode, int index, int count, Type exceptionType ) : void