本文整理汇总了C#中TestPriorities类的典型用法代码示例。如果您正苦于以下问题:C# TestPriorities类的具体用法?C# TestPriorities怎么用?C# TestPriorities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestPriorities类属于命名空间,在下文中一共展示了TestPriorities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScrollItemPatternWrapper
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
internal ScrollItemPatternWrapper(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)
{
Comment("Creating ScrollItemTests");
_pattern = (ScrollItemPattern)GetPattern(m_le, m_useCurrent, ScrollItemPattern.Pattern);
if (_pattern == null)
ThrowMe(CheckType.IncorrectElementConfiguration, Helpers.PatternNotSupported + ": ScrollItemPattern");
// Find the ScrollPattern
_container = m_le;
while (_container != null && !(bool)_container.GetCurrentPropertyValue(AutomationElement.IsScrollPatternAvailableProperty))
_container = TreeWalker.ControlViewWalker.GetParent(_container);
// Check to see if we actual found the container of the scrollitem
if (_container == null)
ThrowMe(CheckType.IncorrectElementConfiguration, "Element does not have a container with ScrollPattern");
Comment("Found scroll container: " + Library.GetUISpyLook(_container));
_scrollPattern = (ScrollPattern)_container.GetCurrentPattern(ScrollPattern.Pattern) as ScrollPattern;
}
示例2: InvokePatternWrapper
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
internal InvokePatternWrapper(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)
{
Comment("Calling GetPattern(InvokePattern) on " + Library.GetUISpyLook(element));
m_pattern = (InvokePattern)GetPattern(m_le, m_useCurrent, InvokePattern.Pattern);
}
示例3: TableItemTests
/// -------------------------------------------------------------------
/// <summary>
/// Get the TableItemPattern on the element
/// </summary>
/// -------------------------------------------------------------------
public TableItemTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
:
base(element, TestSuite, priority, typeOfControl, TypeOfPattern.TableItem, dirResults, testEvents, commands)
{
m_pattern = (TableItemPattern)GetPattern(m_le, m_useCurrent, TableItemPattern.Pattern);
if (m_pattern == null)
throw new Exception(Helpers.PatternNotSupported);
}
示例4: MultipleViewTests
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
public MultipleViewTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
:
base(element, TestSuite, priority, typeOfControl, TypeOfPattern.MultipleView, dirResults, testEvents, commands)
{
m_pattern = (MultipleViewPattern)element.GetCurrentPattern(MultipleViewPattern.Pattern);
if (m_pattern == null)
throw new Exception(Helpers.PatternNotSupported);
}
示例5: AutomationTest
/// <summary>
/// initializes new instance with the testPriority and testType
/// </summary>
public AutomationTest(AutomationTest originalTest, TestPriorities testPriority, TestTypes testType)
{
this.TestCaseAttribute = originalTest.TestCaseAttribute;
this.Method = originalTest.Method;
this._testPriority = testPriority;
this._testType = testType;
}
示例6: TogglePatternWrapper
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
protected TogglePatternWrapper(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 = (TogglePattern)element.GetCurrentPattern(TogglePattern.Pattern);
if (_pattern == null)
throw new Exception("TogglePattern: " + Helpers.PatternNotSupported);
}
示例7: SelectionPatternWrapper
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;
}
示例8: Test
public Test(MyDictionary dictionary, TestTimings timing, TestPriorities priority, int WordCount)
{
this._dictionary = dictionary;
this.timing = timing;
this.priority = priority;
this.wordCount = WordCount;
this.selectedWords = new List<Word>();
this.wrongWords = new List<Word>();
this.CurrentPart = null;
}
示例9: TextScenarioTests
public TextScenarioTests(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
:
base(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands)
{
try
{
_tth = new TextTestsHelper(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);
}
catch( Exception ex )
{
supportsText = false;
Comment("Unknown exception raised: " + ex.ToString() );
}
_NotifiedEvent = new System.Threading.ManualResetEvent(false);
}
示例10: SelectionItemPatternWrapper
/// -------------------------------------------------------------------
/// <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");
}
}
示例11: TextWrapper
internal TextWrapper(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)
{
if (m_le == null)
throw new ArgumentException("m_le cannot be null");
_pattern = (TextPattern)m_le.GetCurrentPattern(TextPattern.Pattern);
_frameworkId = ((string)m_le.GetCurrentPropertyValue(AutomationElement.FrameworkIdProperty)).ToLower(CultureInfo.InvariantCulture);
_testPriority = TestPriorities.BuildVerificationTest; // default value
// Determine if tests currently running on Windows Vista
NativeMethods.OSVERSIONINFOEX ver = new NativeMethods.OSVERSIONINFOEX();
UnsafeNativeMethods.GetVersionEx(ver);
if (ver.majorVersion >= 6) // This should account for Windows Vista + Service Packs
_windowsVista = true; // It may also occur for Vienna, but the expectation is things
else // could change so much post-Vista, that TextPattern tests will
_windowsVista = false; // have to be revisited anyway ((i.e. we will likely be moving to un-managed client)
Comment("Operating System Version = " + ver.majorVersion + "." + ver.minorVersion + "." + ver.buildNumber);
}
示例12: TopLevelEventsScenarioTests
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
public TopLevelEventsScenarioTests(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
:
base(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands)
{
}
示例13: TextTests
public TextTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
: base(element, TestSuite, priority, typeOfControl, TypeOfPattern.Text, dirResults, testEvents, commands)
{
if (element == null)
throw new ArgumentException("element cannot be null");
_pattern = (TextPattern)element.GetCurrentPattern(TextPattern.Pattern);
}
示例14: SelectionTests
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
public SelectionTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
:
base(element, TestSuite, priority, typeOfControl, TypeOfPattern.Selection, dirResults, testEvents, commands)
{
}
示例15: ExpandCollapsePatternWrapper
/// -------------------------------------------------------------------
/// <summary></summary>
/// -------------------------------------------------------------------
internal ExpandCollapsePatternWrapper(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)
{
m_pattern = (ExpandCollapsePattern)GetPattern(m_le, m_useCurrent, ExpandCollapsePattern.Pattern);
}