Exemplo n.º 1
0
        public async Task ListProjectsAsyncAsync()
        {
            var projectId = "project";
            var service   = new FakeBigqueryService();
            var client    = new BigqueryClientImpl(projectId, service);
            var reference = client.GetProjectReference(projectId);

            service.ExpectRequest(
                service.Projects.List(),
                new ProjectList {
                Projects = new[] { new ProjectsData {
                                       ProjectReference = reference
                                   } }
            });
            var result  = client.ListProjectsAsync();
            var dataset = await result.Single();

            Assert.Equal(projectId, dataset.Reference.ProjectId);
        }