Просмотр исходного кода

* DataGridViewRowTest.cs: Added tests for Height and MinimumHeight.

svn path=/trunk/mcs/; revision=73342
Gert Driesen 19 лет назад
Родитель
Сommit
798227aeda

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

@@ -1,3 +1,7 @@
+2007-02-22  Gert Driesen  <[email protected]>
+
+	* DataGridViewRowTest.cs: Added tests for Height and MinimumHeight.
+
 2007-02-21  Gert Driesen  <[email protected]>
 
 	* ComboBoxTest.cs: Added test for setting Text to null if SelecedIndex

+ 30 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs

@@ -56,6 +56,36 @@ namespace MonoTests.System.Windows.Forms {
 			grid.Rows.Add(row);
 			row.Visible = false;
 		}
+
+		[Test]
+		public void Height ()
+		{
+			DataGridViewRow row = new DataGridViewRow();
+			Assert.IsTrue (row.Height > 5, "#1");
+			row.Height = 70;
+			Assert.AreEqual (70, row.Height, "#2");
+			row.Height = 40;
+			Assert.AreEqual (40, row.Height, "#3");
+		}
+
+		[Test]
+		[Category ("NotWorking")]
+		public void MinimumHeight ()
+		{
+			DataGridViewRow row = new DataGridViewRow();
+			Assert.IsTrue (row.MinimumHeight > 0, "#A1");
+			Assert.IsFalse (row.Height > row.MinimumHeight, "#A2");
+			row.MinimumHeight = 40;
+			row.Height = 50;
+			Assert.AreEqual (40, row.MinimumHeight, "#B1");
+			Assert.AreEqual (50, row.Height, "#B2");
+			row.MinimumHeight = 20;
+			Assert.AreEqual (20, row.MinimumHeight, "#C1");
+			Assert.AreEqual (20, row.Height, "#C2");
+			row.MinimumHeight = 40;
+			Assert.AreEqual (40, row.MinimumHeight, "#D1");
+			Assert.AreEqual (40, row.Height, "#D2");
+		}
 	}
 }
 #endif