/// -------------------------------------------------------------------
		/// <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);
        }
		protected override void CustomFixtureSetUp ()
		{
			base.CustomFixtureSetUp ();
			pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern);
			Assert.IsNotNull (pattern);
		}
 internal MultipleViewPatternInformation(MultipleViewPattern pattern, bool cache)
 {
     this.pattern = pattern;
     this.cache   = cache;
 }
		public void NotEnabledTest ()
		{
			RunCommand ("disable list view");
			listView1Element = testFormElement.FindFirst (TreeScope.Children,
				new PropertyCondition (AEIds.NameProperty, "listView1"));
			Assert.IsNotNull (listView1Element);
			pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern);
			// We should expect and ElementNotEnabledException here
			// But since on Windows Winforms there isn't expcetion fired, then we also assert no exception here
			pattern.SetCurrentView (1);
			RunCommand ("enable list view");
			pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern);
		}
Beispiel #5
0
			internal MultipleViewPatternInformation (MultipleViewPattern pattern, bool cache)
			{
				this.pattern = pattern;
				this.cache = cache;
			}