2007-02-05 Adar Wesley <adarw@mainsoft.com>
[mono.git] / mcs / class / System.Web / Test / System.Web.UI.WebControls / CalendarDayTest.cs
1 //
2 // Tests for System.Web.UI.WebControls.CalendarDay.cs
3 //
4 // Author:
5 //      Jordi Mas i Hernandez (jordi@ximian.com)
6 //
7
8 //
9 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 using System.Web.UI.WebControls;
32 using NUnit.Framework;
33 using System;
34 using System.Drawing;
35 using System.IO;
36 using System.Web;
37 using System.Web.UI;
38 using System.Globalization;
39
40
41 namespace MonoTests.System.Web.UI.WebControls
42 {
43
44         [TestFixture]
45         public class CalendarDayTest {
46
47                 CalendarDay calDay = new CalendarDay (DateTime.Today, true, false, true, false, "10");
48
49                 [Test]
50                 public void CalendarDay_Constructor ()
51                 {
52                         Assert.AreEqual (DateTime.Today, calDay.Date, "A1");
53                         Assert.AreEqual ("10", calDay.DayNumberText, "A2");
54                         Assert.AreEqual (false, calDay.IsOtherMonth, "A3");
55                         Assert.AreEqual (false, calDay.IsSelectable, "A4"); // Default value
56                         Assert.AreEqual (true, calDay.IsSelected, "A5");
57                         Assert.AreEqual (false, calDay.IsToday, "A6");
58                         Assert.AreEqual (true, calDay.IsWeekend, "A7");                 
59                 }
60
61                 [Test]
62                 public void IsSelectableProperty ()
63                 {
64                         calDay.IsSelectable = true;
65                         Assert.AreEqual (true, calDay.IsSelectable, "A1");                                              
66                 }
67
68                 
69         }
70 }
71
72