public IHttpActionResult Schedule([FromBody] ScheduledBundleRequest request) { var job = new ScheduledBundleJob(request); var response = this.JobsManager.Schedule <ScheduledBundleJob, ScheduledResponse>(job); return(this.CreatedAtRoute("DefaultApi", new { controller = "jobs", id = response.Id }, response)); }
public async Task Test_BasicAuth() { var schedule = new DateTimeOffset(DateTime.Now); var request = new ScheduledBundleRequest(schedule); request.HttpRequests.Add(NewHttpRequestMessageWithBasicAuth()); var response = await this.client.ScheduleAsync(request) .ConfigureAwait(false); Assert.NotNull(response.Id); Assert.Equal(schedule, response.Schedule); }
public async Task Test_MailAttachments() { var schedule = new DateTimeOffset(DateTime.Now); var request = new ScheduledBundleRequest(schedule); request.MailMessages.Add(NewMailMessageWithAttachments()); var response = await this.client.ScheduleAsync(request) .ConfigureAwait(false); Assert.NotNull(response.Id); Assert.Equal(schedule, response.Schedule); }
public async Task Test_Schedule() { var schedule = new DateTimeOffset(DateTime.Now); var request = new ScheduledBundleRequest(schedule); request.MailMessages.Add(NewMailMessage()); request.HttpRequests.Add(NewHttpRequestMessage()); request.ApexnetPushNotifications.Add(NewApexnetPushNotification()); var response = await this.client.ScheduleAsync(request) .ConfigureAwait(false); Assert.NotNull(response.Id); Assert.Equal(schedule, response.Schedule); }