Exemplo n.º 1
0
        public async Task ListJobsAsync()
        {
            var projectId        = "project";
            var jobId            = "job";
            var service          = new FakeBigqueryService();
            var client           = new BigQueryClientImpl(projectId, service);
            var projectReference = client.GetProjectReference(projectId);
            var jobReference     = client.GetJobReference(projectId, jobId);

            service.ExpectRequest(
                service.Jobs.List(projectId),
                new JobList {
                Jobs = new[] { new JobsData {
                                   JobReference = jobReference
                               } }
            });
            var result = client.ListJobsAsync(projectReference);
            var job    = await result.Single();

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