예제 #1
0
 @Test(
     dataProvider = "ApiVersionDS",
     dependsOnMethods = "resubmitAndCancelJobTest",
     expectedExceptions = IllegalArgumentException.class)
 public void deleteTest(ApiVersionProvider provider) {
   ZencoderAPIVersion apiVersion = provider.getApiVersion();
   IZencoderClient client = createClient(apiVersion);
   ZencoderJob job = new ZencoderJob("");
   job.setJobId(jobMap.get(apiVersion));
   client.deleteJob(job);
 }
예제 #2
0
  @Test(dataProvider = "ApiVersionDS", dependsOnMethods = "createAndCancelJobTest")
  public void resubmitAndCancelJobTest(ApiVersionProvider provider) {

    ZencoderAPIVersion apiVersion = provider.getApiVersion();
    IZencoderClient client = createClient(apiVersion);
    ZencoderJob job = new ZencoderJob("");
    job.setJobId(jobMap.get(apiVersion));

    boolean resubmitted = client.resubmitJob(job);

    Assert.assertTrue(resubmitted);

    boolean canceled = client.cancelJob(job);
    Assert.assertTrue(canceled);
  }
예제 #3
0
  @Test(dataProvider = "ApiVersionDS")
  public void createAndCancelJobTest(ApiVersionProvider provider) {

    ZencoderAPIVersion apiVersion = provider.getApiVersion();
    IZencoderClient client = createClient(apiVersion);
    ZencoderJob job = new ZencoderJob(TEST_VIDEO_URL);
    job.setZencoderRegion(ZENCODER_REGION);
    job.setTest(true);

    client.createJob(job);
    int jobId = job.getJobId();
    Assert.assertTrue(jobId >= 0);

    jobMap.put(apiVersion, jobId);

    boolean canceled = client.cancelJob(job);
    Assert.assertTrue(canceled);
  }