Ejemplo n.º 1
0
        public void TestGetSchedules()
        {
            List <Schedules> schedule       = sch.GetSchedules();
            string           query          = $"select * from Schedules order by rand() limit 1 ;";
            Schedules        scheduleRand   = GetScheduleExecQuery(query);
            string           query1         = $"select * from Schedules order by schedule_id asc limit 1;";
            Schedules        scheduleTop    = GetScheduleExecQuery(query1);
            string           query2         = $"select * from Schedules order by schedule_id desc limit 1;";
            Schedules        scheduleBottom = GetScheduleExecQuery(query2);

            Assert.NotNull(schedule);
            Assert.NotNull(scheduleRand);
            Assert.NotNull(scheduleTop);
            Assert.NotNull(scheduleBottom);

            Assert.True(schedule.IndexOf(scheduleBottom) == schedule.Count - 1);
            Assert.True(schedule.IndexOf(scheduleTop) == 0);
            Assert.Contains(scheduleRand, schedule);
        }
Ejemplo n.º 2
0
 public List <Schedules> GetSchedules()
 {
     return(sche.GetSchedules());
 }
Ejemplo n.º 3
0
 public List <Schedule> GetSchedules()
 {
     return(data.GetSchedules());
 }