예제 #1
0
        public void CreateDataset()
        {
            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 = client.CreateDataset(reference);

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