示例#1
0
 public void TestScheduleJob()
 {
     Uri testUri = new Uri("http://google.com");
     // You will need an app.config with this setting available
     Moment a = new Moment(ConfigurationManager.AppSettings["MomentApp.ApiKey"]);
     var job = a.ScheduleJob(new Job()
     {
         at = DateTime.Now.AddMinutes(1),
         method = "GET",
         uri = testUri
     });
     Assert.IsNotNull(job.id);
 }
示例#2
0
        public void TestScheduleJob()
        {
            Uri testUri = new Uri("http://google.com");
            // You will need an app.config with this setting available
            Moment a   = new Moment(ConfigurationManager.AppSettings["MomentApp.ApiKey"]);
            var    job = a.ScheduleJob(new Job()
            {
                at     = DateTime.Now.AddMinutes(1),
                method = "GET",
                uri    = testUri
            });

            Assert.IsNotNull(job.id);
        }