private void PasteToFillSlide(int originalSlideNo, int expSlideNo)
        {
            Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(originalSlideNo, ShapeToCopyPrefix);
            shapes.Cut();

            PplFeatures.PasteToFillSlide();

            AssertIsSame(originalSlideNo, expSlideNo);
        }
        private void PasteIntoGroup(int originalSlideNo, int expSlideNo)
        {
            Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(originalSlideNo, ShapeToCopyPrefix);
            shapes.Cut();

            PpOperations.SelectShape(GroupToPaste);
            PplFeatures.PasteIntoGroup();

            AssertIsSame(originalSlideNo, expSlideNo);
        }
        private void IsClipboardRestoredPasteIntoGroup(int originalSlideNo, int expSlideNo)
        {
            CheckIfClipboardIsRestored(() =>
            {
                Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(OrigIsClipboardRestoredPasteIntoGroupSlideNo, ShapeToCopyPrefix);
                // This should be restored to clipboard later
                shapes.Cut();

                PpOperations.SelectShape(GroupToPaste);
                PplFeatures.PasteIntoGroup();
            }, originalSlideNo, ShapeToCopyPrefix, expSlideNo, "", ShapeToCompareCopied);
        }
        private void ReplaceWithClipboard(int originalSlideNo, int expSlideNo)
        {
            Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(originalSlideNo, ShapeToCopyPrefix);
            shapes.Cut();

            PpOperations.SelectShapes(new List <string> {
                ShapeToReplace
            });
            PplFeatures.ReplaceWithClipboard();

            AssertIsSame(originalSlideNo, expSlideNo);
        }
        private void PasteAtCursorPosition(int originalSlideNo, int expSlideNo)
        {
            Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(originalSlideNo, ShapeToCopyPrefix);
            shapes.Cut();

            RightClick(GetShapesByPrefix(originalSlideNo, ShapeToClick)[1]);
            // wait for awhile for click to register properly
            ThreadUtil.WaitFor(500);
            PplFeatures.PasteAtCursorPosition();

            AssertIsSame(originalSlideNo, expSlideNo);
        }
        private void IsClipboardRestoredReplaceWithClipboard(int originalSlideNo, int expSlideNo)
        {
            CheckIfClipboardIsRestored(() =>
            {
                Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(OrigIsClipboardRestoredReplaceWithClipboardSlideNo, ShapeToCopyPrefix);
                // This should be restored to clipboard later
                shapes.Cut();

                PpOperations.SelectShapes(new List <string> {
                    ShapeToReplace
                });
                PplFeatures.ReplaceWithClipboard();
            }, originalSlideNo, ShapeToCopyPrefix, expSlideNo, "", ShapeToCompareCopied);
        }
        private void IsDegradedAfterReplaceWithClipboard(int originalSlideNo, int replacedSlideNo, int degradedSlideNo)
        {
            Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = GetShapesByPrefix(replacedSlideNo, ShapeToCopyPrefix);
            shapes.Cut();

            PpOperations.SelectShapes(new List <string> {
                ShapeToReplace
            });
            PplFeatures.ReplaceWithClipboard();

            // Degradation results in subtle differences, therefore comparison threshold must be stricter
            AssertIsSame(originalSlideNo, replacedSlideNo, 0.999999999);

            // Verify that the degradation is detectable
            AssertNotSame(originalSlideNo, degradedSlideNo, 0.999999999);
        }