コード例 #1
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);
  }
コード例 #2
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);
  }