@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); }
@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); }
@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); }