瀏覽代碼

* ComboBoxTest.cs: Added tests for ResetText.

2007-01-25  Rolf Bjarne Kvinge  <[email protected]>


svn path=/trunk/mcs/; revision=71702
Rolf Bjarne Kvinge 19 年之前
父節點
當前提交
19f8a284e5

+ 4 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog

@@ -1,3 +1,7 @@
+2007-01-25  Rolf Bjarne Kvinge  <[email protected]>
+
+	* ComboBoxTest.cs: Added tests for ResetText.
+
 2007-01-25  Rolf Bjarne Kvinge  <[email protected]>
 
 	* ComboBoxTest.cs: Add tests for new properties.

+ 11 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs

@@ -81,6 +81,17 @@ namespace MonoTests.System.Windows.Forms
 		}
 
 #if NET_2_0
+		[Test]
+		public void ResetTextTest ()
+		{
+			ComboBox cmbbox = new ComboBox ();
+			Assert.AreEqual ("", cmbbox.Text, "#01");
+			cmbbox.Text = "abc";
+			Assert.AreEqual ("abc", cmbbox.Text, "#02");
+			cmbbox.ResetText ();
+			Assert.AreEqual ("", cmbbox.Text, "#03");
+		}
+		
 		[Test]
 		public void BackgroundImageLayoutTest ()
 		{