Exemple #1
0
        public void ModifyRequest_NoOp()
        {
            var request = new DeleteRequest(null, "project", "dataset", "table");
            var options = new DeleteTableOptions();

            options.ModifyRequest(request);
        }
Exemple #2
0
        public void DeleteTableEquivalents()
        {
            var datasetId = "dataset";
            var tableId   = "table";
            var schema    = new TableSchemaBuilder().Build();
            var reference = GetTableReference(datasetId, tableId);
            var options   = new DeleteTableOptions();

            VerifyEquivalent(
                client => client.DeleteTable(MatchesWhenSerialized(reference), options),
                client => client.DeleteTable(datasetId, tableId, options),
                client => client.DeleteTable(ProjectId, datasetId, tableId, options),
                client => new BigQueryTable(client, new Table {
                TableReference = reference
            }).Delete(options));
        }
Exemple #3
0
        public void DeleteTableAsyncEquivalents()
        {
            var datasetId = "dataset";
            var tableId   = "table";
            var schema    = new TableSchemaBuilder().Build();
            var reference = GetTableReference(datasetId, tableId);
            var options   = new DeleteTableOptions();
            var token     = new CancellationTokenSource().Token;

            VerifyEquivalentAsync(
                client => client.DeleteTableAsync(MatchesWhenSerialized(reference), options, token),
                client => client.DeleteTableAsync(datasetId, tableId, options, token),
                client => client.DeleteTableAsync(ProjectId, datasetId, tableId, options, token),
                client => new BigQueryTable(client, new Table {
                TableReference = reference
            }).DeleteAsync(options, token));
        }