Exemple #1
0
        public async Task CreateDatasetAsync()
        {
            var projectId = "project";
            var datasetId = "dataset";
            var service   = new FakeBigqueryService();
            var client    = new BigqueryClientImpl(projectId, service);
            var reference = client.GetDatasetReference(projectId, datasetId);

            service.ExpectRequest(
                service.Datasets.Insert(new Dataset {
                DatasetReference = reference
            }, projectId),
                new Dataset {
                DatasetReference = reference
            });
            var result = await client.CreateDatasetAsync(reference);

            Assert.Equal(projectId, result.Reference.ProjectId);
            Assert.Equal(datasetId, result.Reference.DatasetId);
        }