예제 #1
0
        public void TestTodoCompleted(string calendar, ArrayList items)
        {
            IICalendar iCal = iCalendar.LoadFromFile(@"Calendars\Todo\" + calendar)[0];

            ProgramTest.TestCal(iCal);
            ITodo todo = iCal.Todos[0];

            for (int i = 0; i < items.Count; i += 2)
            {
                IDateTime dt = (IDateTime)items[i];
                dt.TZID = tzid;

                bool tf = (bool)items[i + 1];
                if (tf)
                {
                    Assert.IsTrue(todo.IsCompleted(dt), "Todo should be completed at " + dt);
                }
                else
                {
                    Assert.IsFalse(todo.IsCompleted(dt), "Todo should not be completed at " + dt);
                }
            }
        }