public void ModifyRequest_NoOp()
        {
            var request = new CancelRequest(null, "project", "job");
            var options = new CancelJobOptions();

            options.ModifyRequest(request);
        }
Exemple #2
0
        public void CancelJobEquivalents()
        {
            var jobId     = "job";
            var reference = GetJobReference(jobId);
            var options   = new CancelJobOptions();

            VerifyEquivalent(new BigQueryJob(new DerivedBigQueryClient(), GetJob(reference)),
                             client => client.CancelJob(MatchesWhenSerialized(reference), options),
                             client => client.CancelJob(jobId, options),
                             client => client.CancelJob(ProjectId, jobId, options),
                             client => new BigQueryJob(client, GetJob(reference)).Cancel(options));
        }
Exemple #3
0
        public void CancelJobAsyncEquivalents()
        {
            var jobId     = "job";
            var reference = GetJobReference(jobId);
            var options   = new CancelJobOptions();
            var token     = new CancellationTokenSource().Token;

            VerifyEquivalentAsync(new BigQueryJob(new DerivedBigQueryClient(), GetJob(reference)),
                                  client => client.CancelJobAsync(MatchesWhenSerialized(reference), options, token),
                                  client => client.CancelJobAsync(jobId, options, token),
                                  client => client.CancelJobAsync(ProjectId, jobId, options, token),
                                  client => new BigQueryJob(client, GetJob(reference)).CancelAsync(options, token));
        }