public void ClickHeaderTest()
        {
            WeekSelected weekNotify = new WeekSelected();
            DateTime date = new DateTime(2010, 1, 1);
            SchedulerWeekModel week = new SchedulerWeekModel(new SchedulerDisplayInfo(new CultureInfo("cs-CZ")), date, DisplayedDays.Week);
            week.SetDate(date);
            SchedulerMonthWeekHeaderViewModel target = new SchedulerMonthWeekHeaderViewModel(weekNotify, week);

            Assert.IsNull(weekNotify.Week, "Week should be null.");

            ICommand command = target.ClickHeaderCommand;
            command.Execute(null);

            Assert.IsNotNull(weekNotify.Week, "Week should be assigned.");
            Assert.AreEqual(1, weekNotify.Week.Week, "Date should be 1.");
        }
Ejemplo n.º 2
0
        public void ClickHeaderTest()
        {
            WeekSelected       weekNotify = new WeekSelected();
            DateTime           date       = new DateTime(2010, 1, 1);
            SchedulerWeekModel week       = new SchedulerWeekModel(new SchedulerDisplayInfo(new CultureInfo("cs-CZ")), date, DisplayedDays.Week);

            week.SetDate(date);
            SchedulerMonthWeekHeaderViewModel target = new SchedulerMonthWeekHeaderViewModel(weekNotify, week);

            Assert.IsNull(weekNotify.Week, "Week should be null.");

            ICommand command = target.ClickHeaderCommand;

            command.Execute(null);

            Assert.IsNotNull(weekNotify.Week, "Week should be assigned.");
            Assert.AreEqual(1, weekNotify.Week.Week, "Date should be 1.");
        }