Iron Worker API interface
コード例 #1
0
ファイル: TestIronWorker.cs プロジェクト: odeits/IronTools
 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);
 }
コード例 #2
0
ファイル: IronWorkerTest.cs プロジェクト: odeits/IronTools
 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);
 }
コード例 #3
0
ファイル: IronWorkerTest.cs プロジェクト: odeits/IronTools
 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);
 }
コード例 #4
0
ファイル: TestIronWorker.cs プロジェクト: odeits/IronTools
 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);
 }
コード例 #5
0
ファイル: TestIronWorker.cs プロジェクト: odeits/IronTools
 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);
 }
コード例 #6
0
ファイル: IronWorkerTest.cs プロジェクト: odeits/IronTools
        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);
        }