Ejemplo n.º 1
0
        public void CutActionRemovesTextAndSavesToClipboard()
        {
            RichTextBox rtb = new RichTextBox();

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

            ac.Execute();
            Assert.AreEqual("All Watched By Machines Of Loving Grace", rtb.Text, "Text disappears from textbox.");
            Assert.AreEqual("Over ", Clipboard.GetText(), "Clipboard has the text.");
        }
Ejemplo n.º 2
0
        private void cutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CutTextAction ac = new CutTextAction(RTB);

            ac.Execute();
        }