Przeglądaj źródła

2006-06-13 Juraj Skripsky <[email protected]>

	* CalendarTest.cs (SelectDateProperty): Make sure SelectedDate is
	automatically "rounded" to the same date with time set to 12:00am.


svn path=/trunk/mcs/; revision=61681
Juraj Skripsky 19 lat temu
rodzic
commit
dc24a9fea3

+ 8 - 2
mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs

@@ -249,8 +249,14 @@ namespace MonoTests.System.Web.UI.WebControls
 		public void SelectDateProperty ()
 		{
 			PokerCalendar c = new PokerCalendar ();
-			c.SelectedDate = DateTime.Today;
-			Assert.AreEqual (DateTime.Today, c.SelectedDate, "SelectDateProperty");
+			DateTime now = DateTime.Now;
+			DateTime today = now.Date;
+			
+			c.SelectedDate = today;
+			Assert.AreEqual (today, c.SelectedDate, "SelectDateProperty #1");
+
+			c.SelectedDate = now;
+			Assert.AreEqual (today, c.SelectedDate, "SelectDateProperty #2");
 		}
 
 		[Test]

+ 5 - 0
mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,8 @@
+2006-06-13 Juraj Skripsky <[email protected]>
+
+	* CalendarTest.cs (SelectDateProperty): Make sure SelectedDate is
+	automatically "rounded" to the same date with time set to 12:00am.
+
 2006-05-28 Andrew Skiba <[email protected]>
 
 	* ThemeTest.cs, MenuTest.cs, MasterPageTest.cs: rename methods to make