NetIde.Test.FindWindow.FindWindow.ReplaceAll C# (CSharp) Method

ReplaceAll() public method

public ReplaceAll ( ) : void
return void
        public void ReplaceAll()
        {
            Window.FindDescendantByAutomationId("_replaceAll").Invoke.Invoke();
        }

Usage Example

Esempio n. 1
0
        public void ReplaceAllInCurrentWindow()
        {
            using (OpenTestProject(true))
            {
                Assert.IsFalse(InvokeMainMenuItem("Edit", "Replace"));

                FindProjectNode("Project", "FileA").DoubleClick();

                var editorPanel = FindDockPanel("FileA");
                var editor      = editorPanel.Children[0].Children[0];

                Assert.IsTrue(InvokeMainMenuItem("Edit", "Replace"));

                var findWindow = new FindWindow(MainWindow.Children["Find and Replace", ControlType.Window]);

                Assert.AreEqual(LookInType.CurrentDocument, findWindow.LookInType);

                findWindow.FindWhat              = "A";
                findWindow.ReplaceWith           = "B";
                findWindow.MatchCase             = true;
                findWindow.MatchWholeWord        = false;
                findWindow.UseRegularExpressions = false;
                findWindow.LookInFileTypes       = null;

                findWindow.ReplaceAll();

                MessageBox.Show("Hi");

                Assert.AreEqual(
                    @"Ba
Bb
Bc
",
                    editor.Value.Value
                    );

                findWindow.Window.Window.Close();

                editorPanel.Window.Close();

                CloseProject();
            }
        }
All Usage Examples Of NetIde.Test.FindWindow.FindWindow::ReplaceAll