public void UndoTest () { MaskedTextBox mtb; mtb = new MaskedTextBox (); mtb.Text = "abcdef"; Assert.AreEqual (false, mtb.CanUndo, "#A0-c"); mtb.Undo (); Assert.AreEqual ("abcdef", mtb.Text, "#A1"); Assert.AreEqual (false, mtb.CanUndo, "#A1-c"); mtb.Text = "cdef"; mtb.ClearUndo (); Assert.AreEqual ("cdef", mtb.Text, "#A2"); Assert.AreEqual (false, mtb.CanUndo, "#A2-c"); mtb.Dispose (); }