Beispiel #1
0
        public void ToStringTest()
        {
            var name = "PepeGrillo";
            var se   = new ScheduledEvent(name, DateTime.UtcNow);

            Assert.IsNotNull(se);
            Assert.AreEqual(name, se.ToString());
        }
Beispiel #2
0
        public async Task Add_Daily_ScheduledEvent()
        {
            ScheduledEvent se = new ScheduledEvent()
            {
                Name     = "UnitTestDailyScheduled",
                Schedule = new ICalendar(new ScheduleTime(8, 0), new ScheduleTime(23, 0), new ScheduleDay[] { ScheduleDay.MO, ScheduleDay.TU, ScheduleDay.SA })
            };

            Console.WriteLine(se.ToString());

            ServiceResponse response = await eventService.Add_ScheduledEventAsync(VALID_IP, VALID_USER, VALID_PASS, se);

            Console.WriteLine(response.Content);

            Assert.IsTrue(response.IsSuccess);
        }
Beispiel #3
0
        public async Task Add_Yearly_ScheduledEvent()
        {
            ICalendar calendar = new ICalendar(ScheduleMonth.JAN, 15, new ScheduleTime(8), ScheduleMonth.JUL, 30, new ScheduleTime(22));

            ScheduledEvent se = new ScheduledEvent()
            {
                Name     = "UnitTestYearlyScheduled",
                Schedule = calendar
            };

            Console.WriteLine(se.ToString());

            ServiceResponse response = await eventService.Add_ScheduledEventAsync(VALID_IP, VALID_USER, VALID_PASS, se);

            Console.WriteLine(response.Content);

            Assert.IsTrue(response.IsSuccess);
        }
Beispiel #4
0
        public async Task Add_Weekly_ScheduledEvent()
        {
            ICalendar calendar = new ICalendar(ScheduleDay.MO, new ScheduleTime(8, 0), ScheduleDay.FR, new ScheduleTime(23, 0));

            ScheduledEvent se = new ScheduledEvent()
            {
                Name     = "UnitTestWeeklyScheduled",
                Schedule = calendar
            };

            Console.WriteLine(se.ToString());

            ServiceResponse response = await eventService.Add_ScheduledEventAsync(VALID_IP, VALID_USER, VALID_PASS, se);

            Console.WriteLine(response.Content);

            Assert.IsTrue(response.IsSuccess);
        }