bool _Contiguous; //calendar only accept contigious selection /// ------------------------------------------------------------------- /// <summary></summary> /// ------------------------------------------------------------------- internal SelectionPatternWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands) : base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands) { _pattern = (SelectionPattern)GetPattern(m_le, m_useCurrent, SelectionPattern.Pattern); ControlType ct = m_le.GetCurrentPropertyValue(AutomationElement.ControlTypeProperty) as ControlType; _Contiguous = ct == ControlType.Calendar; }
/// ------------------------------------------------------------------- /// <summary></summary> /// ------------------------------------------------------------------- internal SelectionItemPatternWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands) : base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands) { _pattern = (SelectionItemPattern)GetPattern(m_le, m_useCurrent, SelectionItemPattern.Pattern); if (_pattern == null) throw new Exception(Helpers.PatternNotSupported + ": SelectionItemPattern"); _selectionContainer = _pattern.Current.SelectionContainer; if (_selectionContainer != null) { _selectionPattern = _selectionContainer.GetCurrentPattern(SelectionPattern.Pattern) as SelectionPattern; if (_selectionPattern == null) throw new ArgumentException("Could not find the SelectionContainer's SelectionPattern"); } }
/// ------------------------------------------------------------------- /// <summary></summary> /// ------------------------------------------------------------------- internal void TS_SupportsMultipleSelection(SelectionPattern sip, bool expected, CheckType checkType) { bool actual = sip.Current.CanSelectMultiple; if (!actual.Equals(expected)) ThrowMe(checkType, "CanSelectMultiple = " + actual + " but requires " + expected + " for test"); Comment("CanSelectMultiple = " + actual); m_TestStep++; }
/// ------------------------------------------------------------------- /// <summary></summary> /// ------------------------------------------------------------------- internal void TS_AtLeastOneSelectionRequired(SelectionPattern sip, bool expected, CheckType checkType) { bool actual = sip.Current.IsSelectionRequired; if (!actual.Equals(expected)) ThrowMe(checkType, "IsSelectionRequired = " + actual + " but requires " + expected + " for test"); Comment("IsSelectionRequired = " + actual); m_TestStep++; }
internal SelectionPatternInformation(SelectionPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; }
internal SelectionPatternInformation (SelectionPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; }