private void TestParametersAgainstCollection(
            ControlType controlType,
            string searchString,
            IEnumerable <IUiElement> collection,
            int expectedNumberOfElements)
        {
            // Arrange
            string controlTypeString = string.Empty;

            if (null != controlType)
            {
                controlTypeString = controlType.ProgrammaticName.Substring(12);
            }

            GetControlCmdletBase cmdlet =
                FakeFactory.Get_GetControlCmdletBase(controlType, searchString);
            Condition condition =
                ControlSearcher.GetTextSearchCondition(searchString, new string[] { controlTypeString }, false);
            IUiElement element =
                FakeFactory.GetElement_ForFindAll(
                    collection,
                    condition);

            // Act
            var resultList = RealCodeCaller.GetResultList_TextSearch(element, condition);

            // Assert
            MbUnit.Framework.Assert.Count(expectedNumberOfElements, resultList);
            Assert.Equal(expectedNumberOfElements, resultList.Count);
            if (!string.IsNullOrEmpty(searchString))
            {
                MbUnit.Framework.Assert.ForAll(
                    resultList.Cast <IUiElement>().ToList <IUiElement>(),
                    // 20140312
//                    x => x.Current.Name == searchString || x.Current.AutomationId == searchString || x.Current.ClassName == searchString ||
                    x => x.GetCurrent().Name == searchString || x.GetCurrent().AutomationId == searchString || x.GetCurrent().ClassName == searchString ||
                    (null != (x.GetCurrentPattern <IValuePattern>(ValuePattern.Pattern) as IValuePattern) && (x.GetCurrentPattern <IValuePattern>(ValuePattern.Pattern) as IValuePattern).Current.Value == searchString));

                /*
                 * (null != (x.GetCurrentPattern<IValuePattern>(ValuePattern.Pattern) as IValuePattern) ?
                 *   // (x.GetCurrentPattern<IValuePattern, ValuePattern>(ValuePattern.Pattern) as IValuePattern).Current.Value == searchString :
                 *   (x.GetCurrentPattern<IValuePattern>(ValuePattern.Pattern) as IValuePattern).Current.Value == searchString :
                 *   false));
                 */
            }
//            if (null != controlType) {
//                MbUnit.Framework.Assert.ForAll(resultList.Cast<IUiElement>().ToList<IUiElement>(), x => x.Current.ControlType == controlType);
//            }

            Assert.Equal(expectedNumberOfElements, resultList.Count);
            if (!string.IsNullOrEmpty(searchString))
            {
                resultList.All(
                    // 20140312
                    // x => x.Current.Name == searchString || x.Current.AutomationId == searchString || x.Current.ClassName == searchString ||
                    x => x.GetCurrent().Name == searchString || x.GetCurrent().AutomationId == searchString || x.GetCurrent().ClassName == searchString ||
                    (null != (x.GetCurrentPattern <IValuePattern>(ValuePattern.Pattern) as IValuePattern) && (x.GetCurrentPattern <IValuePattern>(ValuePattern.Pattern) as IValuePattern).Current.Value == searchString));

                /*
                 * (null != (x.GetCurrentPattern<IValuePattern>(ValuePattern.Pattern) as IValuePattern) ?
                 *   (x.GetCurrentPattern<IValuePattern>(ValuePattern.Pattern) as IValuePattern).Current.Value == searchString :
                 *   false));
                 */
            }
        }