Ejemplo n.º 1
0
        public async stt::Task DeleteTransitionRouteGroupAsync()
        {
            moq::Mock <TransitionRouteGroups.TransitionRouteGroupsClient> mockGrpcClient = new moq::Mock <TransitionRouteGroups.TransitionRouteGroupsClient>(moq::MockBehavior.Strict);
            DeleteTransitionRouteGroupRequest request = new DeleteTransitionRouteGroupRequest
            {
                TransitionRouteGroupName = TransitionRouteGroupName.FromProjectLocationAgentFlowTransitionRouteGroup("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteTransitionRouteGroupAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            TransitionRouteGroupsClient client = new TransitionRouteGroupsClientImpl(mockGrpcClient.Object, null);
            await client.DeleteTransitionRouteGroupAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteTransitionRouteGroupAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 2
0
        public async stt::Task DeletePredictionApiKeyRegistrationResourceNamesAsync()
        {
            moq::Mock <PredictionApiKeyRegistry.PredictionApiKeyRegistryClient> mockGrpcClient = new moq::Mock <PredictionApiKeyRegistry.PredictionApiKeyRegistryClient>(moq::MockBehavior.Strict);
            DeletePredictionApiKeyRegistrationRequest request = new DeletePredictionApiKeyRegistrationRequest
            {
                PredictionApiKeyRegistrationName = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeletePredictionApiKeyRegistrationAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            PredictionApiKeyRegistryClient client = new PredictionApiKeyRegistryClientImpl(mockGrpcClient.Object, null);
            await client.DeletePredictionApiKeyRegistrationAsync(request.PredictionApiKeyRegistrationName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeletePredictionApiKeyRegistrationAsync(request.PredictionApiKeyRegistrationName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 3
0
        public async stt::Task DeleteIdentityAwareProxyClientRequestObjectAsync()
        {
            moq::Mock <IdentityAwareProxyOAuthService.IdentityAwareProxyOAuthServiceClient> mockGrpcClient = new moq::Mock <IdentityAwareProxyOAuthService.IdentityAwareProxyOAuthServiceClient>(moq::MockBehavior.Strict);
            DeleteIdentityAwareProxyClientRequest request = new DeleteIdentityAwareProxyClientRequest
            {
                Name = "name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteIdentityAwareProxyClientAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            IdentityAwareProxyOAuthServiceClient client = new IdentityAwareProxyOAuthServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteIdentityAwareProxyClientAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteIdentityAwareProxyClientAsync(request, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteContactResourceNamesAsync()
        {
            moq::Mock <EssentialContactsService.EssentialContactsServiceClient> mockGrpcClient = new moq::Mock <EssentialContactsService.EssentialContactsServiceClient>(moq::MockBehavior.Strict);
            DeleteContactRequest request = new DeleteContactRequest
            {
                ContactName = ContactName.FromProjectContact("[PROJECT]", "[CONTACT]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteContactAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            EssentialContactsServiceClient client = new EssentialContactsServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteContactAsync(request.ContactName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteContactAsync(request.ContactName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public void DeleteFeedResourceNames()
        {
            moq::Mock <AssetService.AssetServiceClient> mockGrpcClient = new moq::Mock <AssetService.AssetServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteFeedRequest request = new DeleteFeedRequest
            {
                FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteFeed(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null);

            client.DeleteFeed(request.FeedName);
            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 6
0
        public void DeleteProductResourceNames()
        {
            moq::Mock <ProductService.ProductServiceClient> mockGrpcClient = new moq::Mock <ProductService.ProductServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteProductRequest request = new DeleteProductRequest
            {
                ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteProduct(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            ProductServiceClient client = new ProductServiceClientImpl(mockGrpcClient.Object, null);

            client.DeleteProduct(request.ProductName);
            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 7
0
        public void DeleteIndexResourceNames()
        {
            moq::Mock <FirestoreAdmin.FirestoreAdminClient> mockGrpcClient = new moq::Mock <FirestoreAdmin.FirestoreAdminClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteIndexRequest request = new DeleteIndexRequest
            {
                IndexName = IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteIndex(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            FirestoreAdminClient client = new FirestoreAdminClientImpl(mockGrpcClient.Object, null);

            client.DeleteIndex(request.IndexName);
            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 8
0
        public async stt::Task DeleteEnvironmentRequestObjectAsync()
        {
            moq::Mock <Environments.EnvironmentsClient> mockGrpcClient = new moq::Mock <Environments.EnvironmentsClient>(moq::MockBehavior.Strict);
            DeleteEnvironmentRequest request = new DeleteEnvironmentRequest
            {
                EnvironmentName = EnvironmentName.FromProjectEnvironment("[PROJECT]", "[ENVIRONMENT]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteEnvironmentAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            EnvironmentsClient client = new EnvironmentsClientImpl(mockGrpcClient.Object, null);
            await client.DeleteEnvironmentAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteEnvironmentAsync(request, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteBudgetRequestObjectAsync()
        {
            moq::Mock <BudgetService.BudgetServiceClient> mockGrpcClient = new moq::Mock <BudgetService.BudgetServiceClient>(moq::MockBehavior.Strict);
            DeleteBudgetRequest request = new DeleteBudgetRequest
            {
                BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteBudgetAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            BudgetServiceClient client = new BudgetServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteBudgetAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteBudgetAsync(request, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 10
0
        public async stt::Task DeletePageResourceNamesAsync()
        {
            moq::Mock <Pages.PagesClient> mockGrpcClient = new moq::Mock <Pages.PagesClient>(moq::MockBehavior.Strict);
            DeletePageRequest             request        = new DeletePageRequest
            {
                PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeletePageAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            PagesClient client = new PagesClientImpl(mockGrpcClient.Object, null);
            await client.DeletePageAsync(request.PageName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeletePageAsync(request.PageName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 11
0
        public async stt::Task CancelOperationAsync()
        {
            moq::Mock <Operations.OperationsClient> mockGrpcClient = new moq::Mock <Operations.OperationsClient>(moq::MockBehavior.Strict);
            CancelOperationRequest request = new CancelOperationRequest
            {
                Name = "name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.CancelOperationAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            OperationsClient client = new OperationsClientImpl(mockGrpcClient.Object, null);
            await client.CancelOperationAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.CancelOperationAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 12
0
        public async stt::Task DeleteCompanyAsync()
        {
            moq::Mock <CompanyService.CompanyServiceClient> mockGrpcClient = new moq::Mock <CompanyService.CompanyServiceClient>(moq::MockBehavior.Strict);
            DeleteCompanyRequest request = new DeleteCompanyRequest
            {
                CompanyName = CompanyName.FromProjectTenantCompany("[PROJECT]", "[TENANT]", "[COMPANY]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteCompanyAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            CompanyServiceClient client = new CompanyServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteCompanyAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteCompanyAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public void DeleteCatalogItemResourceNames()
        {
            moq::Mock <CatalogService.CatalogServiceClient> mockGrpcClient = new moq::Mock <CatalogService.CatalogServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteCatalogItemRequest request = new DeleteCatalogItemRequest
            {
                CatalogItemPathName = CatalogItemPathName.FromProjectLocationCatalogCatalogItemPath("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CATALOG_ITEM_PATH]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteCatalogItem(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CatalogServiceClient client = new CatalogServiceClientImpl(mockGrpcClient.Object, null);

            client.DeleteCatalogItem(request.CatalogItemPathName);
            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 14
0
        public async stt::Task DeleteLogMetricResourceNamesAsync()
        {
            moq::Mock <MetricsServiceV2.MetricsServiceV2Client> mockGrpcClient = new moq::Mock <MetricsServiceV2.MetricsServiceV2Client>(moq::MockBehavior.Strict);
            DeleteLogMetricRequest request = new DeleteLogMetricRequest
            {
                MetricNameAsMetricName = MetricName.FromProjectMetric("[PROJECT]", "[METRIC]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteLogMetricAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            MetricsServiceV2Client client = new MetricsServiceV2ClientImpl(mockGrpcClient.Object, null);
            await client.DeleteLogMetricAsync(request.MetricNameAsMetricName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteLogMetricAsync(request.MetricNameAsMetricName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 15
0
        public void DeleteJob()
        {
            moq::Mock <JobController.JobControllerClient> mockGrpcClient = new moq::Mock <JobController.JobControllerClient>(moq::MockBehavior.Strict);
            DeleteJobRequest request = new DeleteJobRequest
            {
                ProjectId = "project_id43ad98b0",
                JobId     = "job_id38ea97d6",
                Region    = "regionedb20d96",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteJob(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            JobControllerClient client = new JobControllerClientImpl(mockGrpcClient.Object, null);

            client.DeleteJob(request.ProjectId, request.Region, request.JobId);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteAccessApprovalSettingsAsync()
        {
            moq::Mock <AccessApproval.AccessApprovalClient> mockGrpcClient = new moq::Mock <AccessApproval.AccessApprovalClient>(moq::MockBehavior.Strict);
            DeleteAccessApprovalSettingsMessage             request        = new DeleteAccessApprovalSettingsMessage
            {
                Name = "name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteAccessApprovalSettingsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            AccessApprovalServiceClient client = new AccessApprovalServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteAccessApprovalSettingsAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteAccessApprovalSettingsAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public void DeleteWorkflowTemplateResourceNames()
        {
            moq::Mock <WorkflowTemplateService.WorkflowTemplateServiceClient> mockGrpcClient = new moq::Mock <WorkflowTemplateService.WorkflowTemplateServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteWorkflowTemplateRequest request = new DeleteWorkflowTemplateRequest
            {
                WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteWorkflowTemplate(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            WorkflowTemplateServiceClient client = new WorkflowTemplateServiceClientImpl(mockGrpcClient.Object, null);

            client.DeleteWorkflowTemplate(request.WorkflowTemplateName);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteConversationProfileAsync()
        {
            moq::Mock <ConversationProfiles.ConversationProfilesClient> mockGrpcClient = new moq::Mock <ConversationProfiles.ConversationProfilesClient>(moq::MockBehavior.Strict);
            DeleteConversationProfileRequest request = new DeleteConversationProfileRequest
            {
                ConversationProfileName = ConversationProfileName.FromProjectConversationProfile("[PROJECT]", "[CONVERSATION_PROFILE]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteConversationProfileAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            ConversationProfilesClient client = new ConversationProfilesClientImpl(mockGrpcClient.Object, null);
            await client.DeleteConversationProfileAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteConversationProfileAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteAutoscalingPolicyResourceNamesAsync()
        {
            moq::Mock <AutoscalingPolicyService.AutoscalingPolicyServiceClient> mockGrpcClient = new moq::Mock <AutoscalingPolicyService.AutoscalingPolicyServiceClient>(moq::MockBehavior.Strict);
            DeleteAutoscalingPolicyRequest request = new DeleteAutoscalingPolicyRequest
            {
                AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteAutoscalingPolicyAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            AutoscalingPolicyServiceClient client = new AutoscalingPolicyServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteAutoscalingPolicyAsync(request.AutoscalingPolicyName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteAutoscalingPolicyAsync(request.AutoscalingPolicyName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 20
0
        public async stt::Task FinalizeStreamAsync()
        {
            moq::Mock <BigQueryStorage.BigQueryStorageClient> mockGrpcClient = new moq::Mock <BigQueryStorage.BigQueryStorageClient>(moq::MockBehavior.Strict);
            FinalizeStreamRequest request = new FinalizeStreamRequest
            {
                Stream = new Stream(),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.FinalizeStreamAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            BigQueryStorageClient client = new BigQueryStorageClientImpl(mockGrpcClient.Object, null);
            await client.FinalizeStreamAsync(request.Stream, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.FinalizeStreamAsync(request.Stream, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 21
0
        public void EndCampaignExperiment()
        {
            moq::Mock <CampaignExperimentService.CampaignExperimentServiceClient> mockGrpcClient = new moq::Mock <CampaignExperimentService.CampaignExperimentServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            EndCampaignExperimentRequest request = new EndCampaignExperimentRequest
            {
                CampaignExperiment = "campaign_experimente81fbe81",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.EndCampaignExperiment(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CampaignExperimentServiceClient client = new CampaignExperimentServiceClientImpl(mockGrpcClient.Object, null);

            client.EndCampaignExperiment(request.CampaignExperiment);
            mockGrpcClient.VerifyAll();
        }
        public void ResumeTransferOperationRequestObject()
        {
            moq::Mock <StorageTransferService.StorageTransferServiceClient> mockGrpcClient = new moq::Mock <StorageTransferService.StorageTransferServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            ResumeTransferOperationRequest request = new ResumeTransferOperationRequest
            {
                Name = "name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.ResumeTransferOperation(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            StorageTransferServiceClient client = new StorageTransferServiceClientImpl(mockGrpcClient.Object, null);

            client.ResumeTransferOperation(request);
            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 23
0
        public void DeleteBreakpoint()
        {
            moq::Mock <Debugger2.Debugger2Client> mockGrpcClient = new moq::Mock <Debugger2.Debugger2Client>(moq::MockBehavior.Strict);
            DeleteBreakpointRequest request = new DeleteBreakpointRequest
            {
                DebuggeeId    = "debuggee_id454a924a",
                BreakpointId  = "breakpoint_id5b0a5ee2",
                ClientVersion = "client_version92be8ead",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteBreakpoint(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            Debugger2Client client = new Debugger2ClientImpl(mockGrpcClient.Object, null);

            client.DeleteBreakpoint(request.DebuggeeId, request.BreakpointId, request.ClientVersion);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteSecuritySettingsResourceNamesAsync()
        {
            moq::Mock <SecuritySettingsService.SecuritySettingsServiceClient> mockGrpcClient = new moq::Mock <SecuritySettingsService.SecuritySettingsServiceClient>(moq::MockBehavior.Strict);
            DeleteSecuritySettingsRequest request = new DeleteSecuritySettingsRequest
            {
                SecuritySettingsName = SecuritySettingsName.FromProjectLocationSecuritySettings("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteSecuritySettingsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            SecuritySettingsServiceClient client = new SecuritySettingsServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteSecuritySettingsAsync(request.SecuritySettingsName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteSecuritySettingsAsync(request.SecuritySettingsName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteSessionEntityTypeResourceNamesAsync()
        {
            moq::Mock <SessionEntityTypes.SessionEntityTypesClient> mockGrpcClient = new moq::Mock <SessionEntityTypes.SessionEntityTypesClient>(moq::MockBehavior.Strict);
            DeleteSessionEntityTypeRequest request = new DeleteSessionEntityTypeRequest
            {
                SessionEntityTypeName = SessionEntityTypeName.FromProjectSessionEntityType("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteSessionEntityTypeAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            SessionEntityTypesClient client = new SessionEntityTypesClientImpl(mockGrpcClient.Object, null);
            await client.DeleteSessionEntityTypeAsync(request.SessionEntityTypeName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteSessionEntityTypeAsync(request.SessionEntityTypeName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteKeyRequestObjectAsync()
        {
            moq::Mock <RecaptchaEnterpriseServiceV1Beta1.RecaptchaEnterpriseServiceV1Beta1Client> mockGrpcClient = new moq::Mock <RecaptchaEnterpriseServiceV1Beta1.RecaptchaEnterpriseServiceV1Beta1Client>(moq::MockBehavior.Strict);
            DeleteKeyRequest request = new DeleteKeyRequest
            {
                KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteKeyAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            RecaptchaEnterpriseServiceV1Beta1Client client = new RecaptchaEnterpriseServiceV1Beta1ClientImpl(mockGrpcClient.Object, null);
            await client.DeleteKeyAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteKeyAsync(request, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 27
0
        public async stt::Task DeleteDocumentAsync()
        {
            moq::Mock <Firestore.FirestoreClient> mockGrpcClient = new moq::Mock <Firestore.FirestoreClient>(moq::MockBehavior.Strict);
            DeleteDocumentRequest request = new DeleteDocumentRequest
            {
                Name = "projects/test/databases/test/documents/name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteDocumentAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            FirestoreClient client = new FirestoreClientImpl(mockGrpcClient.Object, null);
            await client.DeleteDocumentAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteDocumentAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
        public void DeleteAgentResourceNames()
        {
            moq::Mock <Agents.AgentsClient> mockGrpcClient = new moq::Mock <Agents.AgentsClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteAgentRequest request = new DeleteAgentRequest
            {
                ParentAsProjectName = gagr::ProjectName.FromProject("[PROJECT]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteAgent(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            AgentsClient client = new AgentsClientImpl(mockGrpcClient.Object, null);

            client.DeleteAgent(request.ParentAsProjectName);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteWebhookAsync()
        {
            moq::Mock <Webhooks.WebhooksClient> mockGrpcClient = new moq::Mock <Webhooks.WebhooksClient>(moq::MockBehavior.Strict);
            DeleteWebhookRequest request = new DeleteWebhookRequest
            {
                WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteWebhookAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            WebhooksClient client = new WebhooksClientImpl(mockGrpcClient.Object, null);
            await client.DeleteWebhookAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteWebhookAsync(request.Name, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 30
0
        public void DeleteEnvironmentResourceNames()
        {
            moq::Mock <Environments.EnvironmentsClient> mockGrpcClient = new moq::Mock <Environments.EnvironmentsClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteEnvironmentRequest request = new DeleteEnvironmentRequest
            {
                EnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteEnvironment(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            EnvironmentsClient client = new EnvironmentsClientImpl(mockGrpcClient.Object, null);

            client.DeleteEnvironment(request.EnvironmentName);
            mockGrpcClient.VerifyAll();
        }