Exemplo n.º 1
0
        public void MonthContainerShouldContainEvents()
        {
            var dateTime       = new DateTime(2020, 12, 1);
            var monthContainer = new MonthContainer(dateTime);
            var events         = new List <Event>
            {
                new Event(1, "Name", dateTime, dateTime, false)
            };

            monthContainer.AddEvents(events);

            Assert.IsTrue(monthContainer._month.Days.Any(Day => Day.HasEvents));
        }
Exemplo n.º 2
0
        public void MonthContainerShouldContainsEvents()
        {
            var dateTime       = new DateTime(2020, 7, 9);
            var monthContainer = new MonthContainer(dateTime);
            var events         = new List <ICalendarViewEvent>
            {
                new Event(1, "Name event", dateTime, dateTime, false)
            };

            monthContainer.AddEvents(events);

            Assert.IsTrue(monthContainer._month.Days.Any(day => day.HasEvents));
        }
Exemplo n.º 3
0
        public void AllEventsShouldBeRemovedFromMonthContainer()
        {
            var dateTime          = new DateTime(2020, 7, 9);
            var monthContainer    = new MonthContainer(dateTime);
            var calendarViewEvent = new Event(1, "Name event", dateTime, dateTime, false);
            var events            = new List <Event> {
                calendarViewEvent
            };

            monthContainer.AddEvents(events);

            monthContainer.RemoveAllEvents();

            Assert.IsFalse(monthContainer._currentMonth.Days.Any(day => day.HasEvents));
        }