public async Task GetQueryResults_NonQuery() { var resource = new Job { JobReference = new JobReference { ProjectId = "project", JobId = "job" }, Configuration = new JobConfiguration { Copy = new JobConfigurationTableCopy { } } }; var job = new BigQueryJob(new SimpleClient(), resource); Assert.Throws <InvalidOperationException>(() => job.GetQueryResults()); await Assert.ThrowsAsync <InvalidOperationException>(() => job.GetQueryResultsAsync()); }
public async Task GetQueryResults_NoJobReference() { var resource = new Job { Configuration = new JobConfiguration { DryRun = true, Query = new JobConfigurationQuery { DestinationTable = new TableReference { ProjectId = "project", DatasetId = "dataset", TableId = "table" } } } }; var job = new BigQueryJob(new SimpleClient(), resource); Assert.Throws <InvalidOperationException>(() => job.GetQueryResults()); await Assert.ThrowsAsync <InvalidOperationException>(() => job.GetQueryResultsAsync()); }