Пример #1
0
        public void CopyActionToClipboard()
        {
            RichTextBox rtb = new RichTextBox();

            rtb.Text = "All Watched Over By Machines Of Loving Grace";
            rtb.Select(12, 5);
            var ac = new CopyTextAction(rtb);

            ac.Execute();
            Assert.AreEqual("All Watched Over By Machines Of Loving Grace", rtb.Text, "Text is not disappear from textbox.");
            Assert.AreEqual("Over ", Clipboard.GetText(), "Clipboard has the text.");
        }
Пример #2
0
        private void copyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CopyTextAction accc = new CopyTextAction(RTB);

            accc.Execute();
        }