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."); }
private void cutToolStripMenuItem_Click(object sender, EventArgs e) { CutTextAction ac = new CutTextAction(RTB); ac.Execute(); }