Example #1
0
		internal TransformPattern (ITransformPattern source, AutomationElement element, bool cached)
		{
			this.element = element;
			this.cached = cached;
			this.Source = source;
			currentInfo = new TransformPatternInformation (this, false);
			if (cached)
				cachedInfo = new TransformPatternInformation (this, true);
		}
Example #2
0
 internal TransformPattern(ITransformPattern source, AutomationElement element, bool cached)
 {
     this.element = element;
     this.cached  = cached;
     this.Source  = source;
     currentInfo  = new TransformPatternInformation(this, false);
     if (cached)
     {
         cachedInfo = new TransformPatternInformation(this, true);
     }
 }
Example #3
0
        public static ITransformPattern GetTransformPattern(PatternsData data)
        {
            ITransformPattern transformPattern = Substitute.For <ITransformPattern>();

            // transformPattern.Move
            // transformPattern.Resize
            // transformPattern.Rotate
            // transformPattern.Move(Arg.Do<double>(x, y => transformPattern.GetParentElement().Current.BoundingRectangle.X.Returns(x); transformPattern.GetParentElement().Current.BoundingRectangle.Y.Returns(y)));
            transformPattern.Current.CanMove.Returns(data.TransformPattern_CanMove);
            transformPattern.Current.CanResize.Returns(data.TransformPattern_CanResize);
            transformPattern.Current.CanRotate.Returns(data.TransformPattern_CanRotate);
            transformPattern.Cached.CanMove.Returns(data.TransformPattern_CanMove);
            transformPattern.Cached.CanResize.Returns(data.TransformPattern_CanResize);
            transformPattern.Cached.CanRotate.Returns(data.TransformPattern_CanRotate);
            return(transformPattern);
        }
Example #4
0
        public override void Body()
        {
            ActualResult = QAliber.RemotingModel.TestCaseResult.Passed;

            UIControlBase c = UIControlBase.FindControlByPath(control);

            if (!c.Exists)
            {
                ActualResult = QAliber.RemotingModel.TestCaseResult.Failed;
                throw new InvalidOperationException("Control not found");
            }

            ITransformPattern transform = c.GetControlInterface <ITransformPattern>();

            if (transform == null)
            {
                ActualResult = QAliber.RemotingModel.TestCaseResult.Failed;
                throw new InvalidOperationException("Control doesn't appear to be a window");
            }

            transform.Move(point.X, point.Y);
        }
Example #5
0
 public TransformPatternInformation(ITransformPattern transformPattern, bool useCache)
 {
     _transformPattern = transformPattern;
     _useCache = useCache;
 }
Example #6
0
 public TransformPatternInformation(ITransformPattern transformPattern, bool useCache)
 {
     _transformPattern = transformPattern;
     _useCache         = useCache;
 }