Exemple #1
0
        public void CancelJob()
        {
            var projectId = "project";
            var jobId     = "job";
            var service   = new FakeBigqueryService();
            var client    = new BigQueryClientImpl(projectId, service);
            var reference = client.GetJobReference(projectId, jobId);

            service.ExpectRequest(
                service.Jobs.Cancel(projectId, jobId),
                new JobCancelResponse {
                Job = new Job {
                    JobReference = reference
                }
            });
            var result = client.CancelJob(reference);

            Assert.Equal(projectId, result.Reference.ProjectId);
            Assert.Equal(jobId, result.Reference.JobId);
        }