Skip to content

Commit

Permalink
2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
Browse files Browse the repository at this point in the history
	* RichTextBoxTest.cs: New test for the Modified property.


svn path=/branches/mono-2-6/mcs/; revision=150019
  • Loading branch information
carlosalberto committed Jan 21, 2010
1 parent a517a0c commit 2f49fef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
@@ -1,3 +1,7 @@
2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>

* RichTextBoxTest.cs: New test for the Modified property.

2010-01-10 Carlos Alberto Cortez <calberto.cortez@gmail.com>

* ToolStripMenuItemTest: New test for the events related to the check
Expand Down
Expand Up @@ -291,6 +291,23 @@ public void ReadOnly_BackColor_NotSet ()
form.Close ();
}

[Test]
public void Modified ()
{
RichTextBox rtb = new RichTextBox ();
Assert.AreEqual (false, rtb.Modified, "#A1");

rtb.SelectedText = "mono";
Assert.AreEqual (true, rtb.Modified, "#B1");

rtb.Modified = false;
Assert.AreEqual (false, rtb.Modified, "#C1");

// Only SelectedText seems to cause a change in Modified, as opposed to Text
rtb.Text = "moon";
Assert.AreEqual (false, rtb.Modified, "#D1");
}

[Test]
public void ReadOnly_BackColor_Set ()
{
Expand Down

0 comments on commit 2f49fef

Please sign in to comment.