System.Globalization.Tests.CompareInfoMiscTests.IndexOfTest C# (CSharp) Method

IndexOfTest() private method

private IndexOfTest ( CompareInfo compareInfo, string source, string value, int startIndex, int indexOfExpected, int lastIndexOfExpected ) : void
compareInfo CompareInfo
source string
value string
startIndex int
indexOfExpected int
lastIndexOfExpected int
return void
        public void IndexOfTest(CompareInfo compareInfo, string source, string value, int startIndex, int indexOfExpected, int lastIndexOfExpected)
        {
            Assert.Equal(indexOfExpected, compareInfo.IndexOf(source, value, startIndex));
            if (value.Length > 0)
            {
                Assert.Equal(indexOfExpected, compareInfo.IndexOf(source, value[0], startIndex));
            }

            Assert.Equal(lastIndexOfExpected, compareInfo.LastIndexOf(source, value, startIndex));
            if (value.Length > 0)
            {
                Assert.Equal(lastIndexOfExpected, compareInfo.LastIndexOf(source, value[0], startIndex));
            }
        }