public void FindAndChangeWordTest() { RichTextBox richTextBox = new RichTextBox(); richTextBox.Text = "Change this color"; RichBoxEventsNew.FindAndChangeWord(richTextBox, "color", "word", null, 0, 20); richTextBox.Find("word", 0, RichTextBoxFinds.MatchCase); Assert.AreEqual(richTextBox.SelectedText, "word"); }
public void FindAndChangeColorTest() { RichTextBox richTextBox = new RichTextBox(); richTextBox.Text = "Change this color"; RichBoxEventsNew.FindAndChangeColor(richTextBox, "this", null, Color.Green, 0); richTextBox.Find("this", 0, RichTextBoxFinds.MatchCase); Assert.AreEqual(richTextBox.SelectionColor, Color.Green); }