示例#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);
        }