• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TestPriorities类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中TestPriorities的典型用法代码示例。如果您正苦于以下问题:C# TestPriorities类的具体用法?C# TestPriorities怎么用?C# TestPriorities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TestPriorities类属于命名空间,在下文中一共展示了TestPriorities类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;

        }
开发者ID:jeffras,项目名称:uiverify,代码行数:28,代码来源:ScrollItemTests.cs


示例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);
 }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:10,代码来源:InvokeTests.cs


示例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);
        }
开发者ID:jeffras,项目名称:uiverify,代码行数:13,代码来源:TableItemTests.cs


示例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);
        }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:11,代码来源:MultipleViewTests.cs


示例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;
        }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:11,代码来源:AutomationTest.cs


示例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);
        }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:12,代码来源:ToggleTests.cs


示例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;
        }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:14,代码来源:SelectionTests.cs


示例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;
 }
开发者ID:iv22,项目名称:Dictionary,代码行数:10,代码来源:Test.cs


示例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);
 }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:15,代码来源:Text.cs


示例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");
            }

        }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:21,代码来源:SelectionItemTests.cs


示例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);
        }
开发者ID:sergeyDyadenchuk,项目名称:Testing,代码行数:21,代码来源:TextTests.cs


示例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)
 {
 }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:8,代码来源:TopLevelEvents.cs


示例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);
        }
开发者ID:sergeyDyadenchuk,项目名称:Testing,代码行数:8,代码来源:TextTests.cs


示例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)
 {
 }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:8,代码来源:SelectionTests.cs


示例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);
        }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:9,代码来源:ExpandCollapseTests.cs


示例16: AvalonTextScenarioTests

 public AvalonTextScenarioTests(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)
 {
     _NotifiedEvent = new System.Threading.ManualResetEvent(false);
 }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:6,代码来源:TextPatternAvalon.cs


示例17: GetPriorityName

        /// <summary>
        /// returns user friendly name for testPriority
        /// </summary>
        /// <param name="testPriority"></param>
        /// <returns></returns>
        private string GetPriorityName(TestPriorities testPriority)
        {
            string name;

            switch (testPriority)
            {
                case TestPriorities.BuildVerificationTests: name = "Build Verification Tests"; break;
                case TestPriorities.Priority0Tests: name = "Priority 0 Tests"; break;
                case TestPriorities.Priority1Tests: name = "Priority 1 Tests"; break;
                case TestPriorities.Priority2Tests: name = "Priority 2 Tests"; break;
                case TestPriorities.Priority3Tests: name = "Priority 3 Tests"; break;
                case TestPriorities.OnlyPriorityAllTests: name = "Priority All Tests"; break;

                default:
                    {
                        Debug.Fail("unexpected TestPriorities value");
                        name = Enum.GetName(typeof(TestPriorities), testPriority);
                    }
                    break;
            }

            return name;
        }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:28,代码来源:AutomationTestsControl.cs


示例18: GetPatternTestObject

        /// ---------------------------------------------------------------
        /// <summary>
        /// Get test object associated with the testSuite namespace
        /// </summary>
        /// ---------------------------------------------------------------
        internal static object GetPatternTestObject(string testSuite, AutomationElement element, bool testEvents, TestPriorities priority, IApplicationCommands commands)
        {
            Type assemblyType = null;
            try
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                assemblyType = assembly.GetType(testSuite);
                if (assemblyType == null)
                    throw new Exception("Could not load type \"" + testSuite + "\"");

                return Activator.CreateInstance(assemblyType,
                    new object[] { element, priority, null, testEvents, TypeOfControl.UnknownControl, commands });
            }
            catch (Exception error)
            {
                string s = string.Format("Failed to Activator.CreateInstance({0}) because {1}", assemblyType.Name, error.InnerException.Message);
                throw new Exception(s, error.InnerException);
            }
        }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:25,代码来源:TestObject.cs


示例19: GetScenarioTestObject

        /// ---------------------------------------------------------------
        /// <summary></summary>
        /// ---------------------------------------------------------------
        internal static object GetScenarioTestObject(string testSuite, AutomationElement element, bool testEvents, TestPriorities priority, IApplicationCommands commands)
        {

            TestType testType = GetTestType(testSuite);

            switch (testType)
            {

                case TestType.MenuScenarioTests:
                    return new MenuScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                case TestType.NarratorScenarioTests:
                    return new NarratorScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                case TestType.MsaaScenarioTests:
                    return new MsaaScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                case TestType.TextScenarioTests:
                    return new TextScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                case TestType.ScreenReaderScenarioTests:
                    return new ScreenReaderScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                case TestType.TopLevelEventsScenarioTests:
                    return new TopLevelEventsScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                case TestType.AvalonTextScenarioTests:
                    return new AvalonTextScenarioTests(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);

                default:
                    throw new Exception("Unhandled TestType(" + testType + ") in GetScenarioTestObject()");
            }
        }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:36,代码来源:TestObject.cs


示例20: TestObject

 /// -------------------------------------------------------------------
 /// <summary>
 /// Constructor
 /// </summary>
 /// -------------------------------------------------------------------
 public TestObject(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
 {
     m_le = element;
     _appCommands = commands;
     m_TestPriority = priority;
     m_TypeOfControl = typeOfControl;
     m_TypeOfPattern = typeOfPattern;
     _testEvents = testEvents;
     _testSuite = testSuite;
     m_TestStep = 0;
     _testCaseAttribute = null;
     TestObject.m_testObject = this;
     #if NATIVE_UIA
     GetGlobalizedQueryString(m_le);
     #endif
 }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:21,代码来源:TestObject.cs



注:本文中的TestPriorities类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TestRepository类代码示例发布时间:2022-05-24
下一篇:
C# TestParameters类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap