/// <summary>Snippet for CreateAccountLink</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateAccountLink() { // Create client AccountLinkServiceClient accountLinkServiceClient = AccountLinkServiceClient.Create(); // Initialize request argument(s) string customerId = ""; AccountLink accountLink = new AccountLink(); // Make the request CreateAccountLinkResponse response = accountLinkServiceClient.CreateAccountLink(customerId, accountLink); }
/// <summary>Snippet for CreateAccountLinkAsync</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 CreateAccountLinkAsync() { // Create client AccountLinkServiceClient accountLinkServiceClient = await AccountLinkServiceClient.CreateAsync(); // Initialize request argument(s) string customerId = ""; AccountLink accountLink = new AccountLink(); // Make the request CreateAccountLinkResponse response = await accountLinkServiceClient.CreateAccountLinkAsync(customerId, accountLink); }
/// <summary>Snippet for CreateAccountLink</summary> public void CreateAccountLink() { // Snippet: CreateAccountLink(string, AccountLink, CallSettings) // Create client AccountLinkServiceClient accountLinkServiceClient = AccountLinkServiceClient.Create(); // Initialize request argument(s) string customerId = ""; AccountLink accountLink = new AccountLink(); // Make the request CreateAccountLinkResponse response = accountLinkServiceClient.CreateAccountLink(customerId, accountLink); // End snippet }
/// <summary>Snippet for CreateAccountLink</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateAccountLinkRequestObject() { // Create client AccountLinkServiceClient accountLinkServiceClient = AccountLinkServiceClient.Create(); // Initialize request argument(s) CreateAccountLinkRequest request = new CreateAccountLinkRequest { CustomerId = "", AccountLink = new AccountLink(), }; // Make the request CreateAccountLinkResponse response = accountLinkServiceClient.CreateAccountLink(request); }
/// <summary>Snippet for CreateAccountLinkAsync</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 CreateAccountLinkRequestObjectAsync() { // Create client AccountLinkServiceClient accountLinkServiceClient = await AccountLinkServiceClient.CreateAsync(); // Initialize request argument(s) CreateAccountLinkRequest request = new CreateAccountLinkRequest { CustomerId = "", AccountLink = new AccountLink(), }; // Make the request CreateAccountLinkResponse response = await accountLinkServiceClient.CreateAccountLinkAsync(request); }
/// <summary>Snippet for CreateAccountLinkAsync</summary> public async Task CreateAccountLinkAsync() { // Snippet: CreateAccountLinkAsync(string, AccountLink, CallSettings) // Additional: CreateAccountLinkAsync(string, AccountLink, CancellationToken) // Create client AccountLinkServiceClient accountLinkServiceClient = await AccountLinkServiceClient.CreateAsync(); // Initialize request argument(s) string customerId = ""; AccountLink accountLink = new AccountLink(); // Make the request CreateAccountLinkResponse response = await accountLinkServiceClient.CreateAccountLinkAsync(customerId, accountLink); // End snippet }
/// <summary>Snippet for CreateAccountLinkAsync</summary> public async Task CreateAccountLinkRequestObjectAsync() { // Snippet: CreateAccountLinkAsync(CreateAccountLinkRequest, CallSettings) // Additional: CreateAccountLinkAsync(CreateAccountLinkRequest, CancellationToken) // Create client AccountLinkServiceClient accountLinkServiceClient = await AccountLinkServiceClient.CreateAsync(); // Initialize request argument(s) CreateAccountLinkRequest request = new CreateAccountLinkRequest { CustomerId = "", AccountLink = new AccountLink(), }; // Make the request CreateAccountLinkResponse response = await accountLinkServiceClient.CreateAccountLinkAsync(request); // End snippet }
public void CreateAccountLink() { moq::Mock <AccountLinkService.AccountLinkServiceClient> mockGrpcClient = new moq::Mock <AccountLinkService.AccountLinkServiceClient>(moq::MockBehavior.Strict); CreateAccountLinkRequest request = new CreateAccountLinkRequest { CustomerId = "customer_id3b3724cb", AccountLink = new gagvr::AccountLink(), }; CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse { ResourceName = "resource_name8cc2e687", }; mockGrpcClient.Setup(x => x.CreateAccountLink(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); CreateAccountLinkResponse response = client.CreateAccountLink(request.CustomerId, request.AccountLink); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void CreateAccountLink() { moq::Mock <AccountLinkService.AccountLinkServiceClient> mockGrpcClient = new moq::Mock <AccountLinkService.AccountLinkServiceClient>(moq::MockBehavior.Strict); CreateAccountLinkRequest request = new CreateAccountLinkRequest { CustomerId = "customer_id3b3724cb", AccountLink = new gagvr::AccountLink(), }; CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse { ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), }; mockGrpcClient.Setup(x => x.CreateAccountLink(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); CreateAccountLinkResponse response = client.CreateAccountLink(request.CustomerId, request.AccountLink); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async stt::Task CreateAccountLinkAsync() { moq::Mock <AccountLinkService.AccountLinkServiceClient> mockGrpcClient = new moq::Mock <AccountLinkService.AccountLinkServiceClient>(moq::MockBehavior.Strict); CreateAccountLinkRequest request = new CreateAccountLinkRequest { CustomerId = "customer_id3b3724cb", AccountLink = new gagvr::AccountLink(), }; CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse { ResourceName = "resource_name8cc2e687", }; mockGrpcClient.Setup(x => x.CreateAccountLinkAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <CreateAccountLinkResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); CreateAccountLinkResponse responseCallSettings = await client.CreateAccountLinkAsync(request.CustomerId, request.AccountLink, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); CreateAccountLinkResponse responseCancellationToken = await client.CreateAccountLinkAsync(request.CustomerId, request.AccountLink, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }