Example #1
0
        public void TestCancelSchedule()
        {
            string     projectId = string.Empty;                     // TODO: Initialize to an appropriate value
            string     token     = string.Empty;                     // TODO: Initialize to an appropriate value
            IronWorker target    = new IronWorker(projectId, token); // TODO: Initialize to an appropriate value
            string     id        = string.Empty;                     // TODO: Initialize to an appropriate value

            target.CancelSchedule(id);
        }
Example #2
0
        public void LogTest()
        {
            IronWorker target   = new IronWorker();
            string     id       = string.Empty; // TODO: Initialize to an appropriate value
            string     expected = string.Empty; // TODO: Initialize to an appropriate value
            string     actual;

            actual = target.Log(id);
            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void TestSchedule()
        {
            string       projectId = string.Empty;                     // TODO: Initialize to an appropriate value
            string       token     = string.Empty;                     // TODO: Initialize to an appropriate value
            IronWorker   target    = new IronWorker(projectId, token); // TODO: Initialize to an appropriate value
            string       id        = string.Empty;                     // TODO: Initialize to an appropriate value
            ScheduleTask expected  = null;                             // TODO: Initialize to an appropriate value
            ScheduleTask actual;

            actual = target.Schedule(id);
            Assert.AreEqual(expected, actual);
        }
Example #4
0
        public void TasksTest()
        {
            IronWorker   target       = new IronWorker();
            int          page         = 0;              // TODO: Initialize to an appropriate value
            int          per_page     = 10;             // TODO: Initialize to an appropriate value
            StatusEnum   statusFilter = StatusEnum.All; // TODO: Initialize to an appropriate value
            DateTime?    from_time    = null;           // TODO: Initialize to an appropriate value
            DateTime?    to_time      = null;           // TODO: Initialize to an appropriate value
            IList <Task> actual;

            actual = target.Tasks(page, per_page, statusFilter, from_time, to_time);
            Assert.IsNotNull(actual);
        }
Example #5
0
        public void TaskTest()
        {
            IronWorker target = new IronWorker();
            var        tasks  = target.Tasks(per_page: 1);

            Assert.AreEqual(1, tasks.Count);

            string id = tasks[0].Id;
            Task   actual;

            actual = target.Task(id);
            Assert.IsNotNull(actual);
            Assert.AreEqual(id, actual.Id);
        }
Example #6
0
        public void TestScheduleWorker()
        {
            IronWorker   target    = new IronWorker(); // TODO: Initialize to an appropriate value
            ScheduleTask schedules = new ScheduleTask()
            {
                CodeName = "IronToolsTest",
                RunTimes = 10,
                RunEvery = 60 * 60
            };                           // TODO: Initialize to an appropriate value
            int            expected = 1; // TODO: Initialize to an appropriate value
            IList <string> actual;

            actual = target.ScheduleWorker(schedules);
            Assert.IsNotNull(actual);
            Assert.AreEqual(expected, actual.Count);
        }