public GetJobStateTest(TranscoderFixture fixture)
        {
            _fixture      = fixture;
            _createSample = new CreateJobFromAdHocSample();
            _getSample    = new GetJobStateSample();

            string outputUri = $"gs://{_fixture.BucketName}/test-output-get-job/";
            var    result    = _createSample.CreateJobFromAdHoc(
                _fixture.ProjectId, _fixture.Location,
                _fixture.InputUri, outputUri);

            _jobId = result.JobName.JobId;
            _fixture.JobIds.Add(_jobId);
        }
        public ListJobsTest(TranscoderFixture fixture)
        {
            _fixture      = fixture;
            _createSample = new CreateJobFromAdHocSample();
            _listSample   = new ListJobsSample();

            string outputUri = $"gs://{_fixture.BucketName}/test-output-list-jobs/";
            // Run the sample code.
            var result = _createSample.CreateJobFromAdHoc(
                _fixture.ProjectId, _fixture.Location,
                _fixture.InputUri, outputUri);

            _jobId = result.JobName.JobId;
            _fixture.JobIds.Add(_jobId);
        }
Ejemplo n.º 3
0
        public void CreatesJobFromAdHoc()
        {
            string outputUri = $"gs://{_fixture.BucketName}/test-output-adhoc/";
            // Run the sample code.
            var result = _createSample.CreateJobFromAdHoc(_fixture.ProjectId, _fixture.Location, _fixture.InputUri, outputUri);

            _fixture.JobIds.Add(result.JobName.JobId);

            Assert.Equal(_fixture.Location, result.JobName.LocationId);
            // Job resource name uses project number for the identifier.
            Assert.Equal(_fixture.ProjectNumber, result.JobName.ProjectId);

            _fixture.JobPoller.Eventually(() =>
                                          Assert.Equal(_fixture.JobStateSucceeded, _getSample.GetJobState(_fixture.ProjectId, _fixture.Location, result.JobName.JobId)
                                                       ));
        }