示例#1
0
        public void TestSelectedColorDefault()
        {
            PokerCalendar p = new PokerCalendar();

            p.TodaysDate   = new DateTime(2005, 8, 4);
            p.SelectedDate = p.TodaysDate;
            string s = p.Render();

            Assert.IsTrue(s.IndexOf("color:White") != 1 && s.IndexOf("background-color:Silver") != -1, "A1");
        }
示例#2
0
        public void TestDayRenderCellAdd()
        {
            PokerCalendar p = new PokerCalendar();

            tofind = Guid.NewGuid().ToString();

            p.DayRender += new DayRenderEventHandler(Event_TestDayRenderCellAdd_DayRender);

            Assert.IsTrue(p.Render().IndexOf(tofind) != -1, "control added");
        }
示例#3
0
        public void HaveID()
        {
            PokerCalendar p = new PokerCalendar();

            p.ID           = "hola";
            p.TodaysDate   = new DateTime(2005, 8, 4);
            p.SelectedDate = p.TodaysDate;
            string s = p.Render();

            Assert.IsTrue(s.IndexOf("id=\"hola\"") != -1, "#01");
        }
示例#4
0
        public void TestRenderMonthStartsOnSunday()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false);
            PokerCalendar p = new PokerCalendar();

            p.TodaysDate = new DateTime(2005, 5, 14);

            first        = true;
            p.DayRender += new DayRenderEventHandler(Event_TestRenderMonthStartsOnSunday_DayRender);
            p.Render();
        }
示例#5
0
        public void HaveBaseAttributes()
        {
            PokerCalendar p = new PokerCalendar();

            p.ID           = "hola";
            p.ToolTip      = "adios";
            p.TodaysDate   = new DateTime(2005, 8, 4);
            p.SelectedDate = p.TodaysDate;
            string s = p.Render();

            Assert.IsTrue(s.IndexOf("adios") != -1, "#01");
            Assert.IsTrue(p.CS_Called == true, "#02");
        }
		public void HaveBaseAttributes ()
		{
			PokerCalendar p = new PokerCalendar ();
			p.ID = "hola";
			p.ToolTip = "adios";
			p.TodaysDate = new DateTime (2005, 8, 4);
			p.SelectedDate = p.TodaysDate;
			string s = p.Render();
			Assert.IsTrue (s.IndexOf ("adios") != -1, "#01");
			Assert.IsTrue (p.CS_Called == true, "#02");
		}
		public void HaveID ()
		{
			PokerCalendar p = new PokerCalendar ();
			p.ID = "hola";
			p.TodaysDate = new DateTime (2005, 8, 4);
			p.SelectedDate = p.TodaysDate;
			string s = p.Render();
			Assert.IsTrue (s.IndexOf ("id=\"hola\"") != -1, "#01");
		}
		public void TestSelectedColorDefault ()
		{
			PokerCalendar p = new PokerCalendar ();
			p.TodaysDate = new DateTime (2005, 8, 4);
			p.SelectedDate = p.TodaysDate;
			string s = p.Render();
			Assert.IsTrue (s.IndexOf ("color:White") != 1 && s.IndexOf ("background-color:Silver") != -1, "A1");
		}
		public void TestRenderMonthStartsOnSunday ()
		{
			Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-US", false);
			PokerCalendar p = new PokerCalendar ();
			p.TodaysDate = new DateTime (2005, 5, 14);
			
			first = true;
			p.DayRender += new DayRenderEventHandler(Event_TestRenderMonthStartsOnSunday_DayRender);
			p.Render ();
		}
		public void TestDayRenderCellAdd ()
		{
			PokerCalendar p = new PokerCalendar ();
			tofind = Guid.NewGuid ().ToString ();

			p.DayRender += new DayRenderEventHandler(Event_TestDayRenderCellAdd_DayRender);

			Assert.IsTrue (p.Render ().IndexOf (tofind) != -1, "control added");
		}