public async stt::Task ListPaymentsAccountsRequestObjectAsync()
        {
            moq::Mock <PaymentsAccountService.PaymentsAccountServiceClient> mockGrpcClient = new moq::Mock <PaymentsAccountService.PaymentsAccountServiceClient>(moq::MockBehavior.Strict);
            ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest
            {
                CustomerId = "customer_id3b3724cb",
            };
            ListPaymentsAccountsResponse expectedResponse = new ListPaymentsAccountsResponse
            {
                PaymentsAccounts =
                {
                    new gagvr::PaymentsAccount(),
                },
            };

            mockGrpcClient.Setup(x => x.ListPaymentsAccountsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <ListPaymentsAccountsResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            PaymentsAccountServiceClient client = new PaymentsAccountServiceClientImpl(mockGrpcClient.Object, null);
            ListPaymentsAccountsResponse responseCallSettings = await client.ListPaymentsAccountsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            ListPaymentsAccountsResponse responseCancellationToken = await client.ListPaymentsAccountsAsync(request, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for ListPaymentsAccounts</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void ListPaymentsAccounts()
 {
     // Create client
     PaymentsAccountServiceClient paymentsAccountServiceClient = PaymentsAccountServiceClient.Create();
     // Initialize request argument(s)
     string customerId = "";
     // Make the request
     ListPaymentsAccountsResponse response = paymentsAccountServiceClient.ListPaymentsAccounts(customerId);
 }
        /// <summary>Snippet for ListPaymentsAccountsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ListPaymentsAccountsAsync()
        {
            // Create client
            PaymentsAccountServiceClient paymentsAccountServiceClient = await PaymentsAccountServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            // Make the request
            ListPaymentsAccountsResponse response = await paymentsAccountServiceClient.ListPaymentsAccountsAsync(customerId);
        }
Exemple #4
0
 /// <summary>Snippet for ListPaymentsAccounts</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void ListPaymentsAccountsRequestObject()
 {
     // Create client
     PaymentsAccountServiceClient paymentsAccountServiceClient = PaymentsAccountServiceClient.Create();
     // Initialize request argument(s)
     ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest {
         CustomerId = "",
     };
     // Make the request
     ListPaymentsAccountsResponse response = paymentsAccountServiceClient.ListPaymentsAccounts(request);
 }
        /// <summary>Snippet for ListPaymentsAccountsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ListPaymentsAccountsRequestObjectAsync()
        {
            // Create client
            PaymentsAccountServiceClient paymentsAccountServiceClient = await PaymentsAccountServiceClient.CreateAsync();

            // Initialize request argument(s)
            ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest {
                CustomerId = "",
            };
            // Make the request
            ListPaymentsAccountsResponse response = await paymentsAccountServiceClient.ListPaymentsAccountsAsync(request);
        }
Exemple #6
0
        /// <summary>Snippet for ListPaymentsAccountsAsync</summary>
        public async Task ListPaymentsAccountsAsync()
        {
            // Snippet: ListPaymentsAccountsAsync(string, CallSettings)
            // Additional: ListPaymentsAccountsAsync(string, CancellationToken)
            // Create client
            PaymentsAccountServiceClient paymentsAccountServiceClient = await PaymentsAccountServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            // Make the request
            ListPaymentsAccountsResponse response = await paymentsAccountServiceClient.ListPaymentsAccountsAsync(customerId);

            // End snippet
        }
Exemple #7
0
        /// <summary>Snippet for ListPaymentsAccountsAsync</summary>
        public async Task ListPaymentsAccountsRequestObjectAsync()
        {
            // Snippet: ListPaymentsAccountsAsync(ListPaymentsAccountsRequest, CallSettings)
            // Additional: ListPaymentsAccountsAsync(ListPaymentsAccountsRequest, CancellationToken)
            // Create client
            PaymentsAccountServiceClient paymentsAccountServiceClient = await PaymentsAccountServiceClient.CreateAsync();

            // Initialize request argument(s)
            ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest {
                CustomerId = "",
            };
            // Make the request
            ListPaymentsAccountsResponse response = await paymentsAccountServiceClient.ListPaymentsAccountsAsync(request);

            // End snippet
        }
Exemple #8
0
        public async Task ListPaymentsAccountsAsync2()
        {
            Mock <PaymentsAccountService.PaymentsAccountServiceClient> mockGrpcClient = new Mock <PaymentsAccountService.PaymentsAccountServiceClient>(MockBehavior.Strict);
            ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest
            {
                CustomerId = "customerId-1772061412",
            };
            ListPaymentsAccountsResponse expectedResponse = new ListPaymentsAccountsResponse();

            mockGrpcClient.Setup(x => x.ListPaymentsAccountsAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <ListPaymentsAccountsResponse>(Task.FromResult(expectedResponse), null, null, null, null));
            PaymentsAccountServiceClient client   = new PaymentsAccountServiceClientImpl(mockGrpcClient.Object, null);
            ListPaymentsAccountsResponse response = await client.ListPaymentsAccountsAsync(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Exemple #9
0
        public void ListPaymentsAccounts2()
        {
            Mock <PaymentsAccountService.PaymentsAccountServiceClient> mockGrpcClient = new Mock <PaymentsAccountService.PaymentsAccountServiceClient>(MockBehavior.Strict);
            ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest
            {
                CustomerId = "customerId-1772061412",
            };
            ListPaymentsAccountsResponse expectedResponse = new ListPaymentsAccountsResponse();

            mockGrpcClient.Setup(x => x.ListPaymentsAccounts(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            PaymentsAccountServiceClient client   = new PaymentsAccountServiceClientImpl(mockGrpcClient.Object, null);
            ListPaymentsAccountsResponse response = client.ListPaymentsAccounts(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void ListPaymentsAccounts()
        {
            moq::Mock <PaymentsAccountService.PaymentsAccountServiceClient> mockGrpcClient = new moq::Mock <PaymentsAccountService.PaymentsAccountServiceClient>(moq::MockBehavior.Strict);
            ListPaymentsAccountsRequest request = new ListPaymentsAccountsRequest
            {
                CustomerId = "customer_id3b3724cb",
            };
            ListPaymentsAccountsResponse expectedResponse = new ListPaymentsAccountsResponse
            {
                PaymentsAccounts =
                {
                    new gagvr::PaymentsAccount(),
                },
            };

            mockGrpcClient.Setup(x => x.ListPaymentsAccounts(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            PaymentsAccountServiceClient client   = new PaymentsAccountServiceClientImpl(mockGrpcClient.Object, null);
            ListPaymentsAccountsResponse response = client.ListPaymentsAccounts(request.CustomerId);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }