/// <summary>Snippet for GetClickView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetClickViewResourceNames()
 {
     // Create client
     ClickViewServiceClient clickViewServiceClient = ClickViewServiceClient.Create();
     // Initialize request argument(s)
     ClickViewName resourceName = ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]");
     // Make the request
     ClickView response = clickViewServiceClient.GetClickView(resourceName);
 }
Beispiel #2
0
        /// <summary>Snippet for GetClickViewAsync</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 GetClickViewResourceNamesAsync()
        {
            // Create client
            ClickViewServiceClient clickViewServiceClient = await ClickViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            ClickViewName resourceName = ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]");
            // Make the request
            ClickView response = await clickViewServiceClient.GetClickViewAsync(resourceName);
        }
 /// <summary>Snippet for GetClickView</summary>
 public void GetClickViewResourceNames()
 {
     // Snippet: GetClickView(ClickViewName, CallSettings)
     // Create client
     ClickViewServiceClient clickViewServiceClient = ClickViewServiceClient.Create();
     // Initialize request argument(s)
     ClickViewName resourceName = ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]");
     // Make the request
     ClickView response = clickViewServiceClient.GetClickView(resourceName);
     // End snippet
 }
 /// <summary>Snippet for GetClickView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetClickViewRequestObject()
 {
     // Create client
     ClickViewServiceClient clickViewServiceClient = ClickViewServiceClient.Create();
     // Initialize request argument(s)
     GetClickViewRequest request = new GetClickViewRequest
     {
         ResourceNameAsClickViewName = ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"),
     };
     // Make the request
     ClickView response = clickViewServiceClient.GetClickView(request);
 }
 /// <summary>Snippet for GetClickView</summary>
 public void GetClickViewRequestObject()
 {
     // Snippet: GetClickView(GetClickViewRequest, CallSettings)
     // Create client
     ClickViewServiceClient clickViewServiceClient = ClickViewServiceClient.Create();
     // Initialize request argument(s)
     GetClickViewRequest request = new GetClickViewRequest
     {
         ResourceNameAsClickViewName = ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"),
     };
     // Make the request
     ClickView response = clickViewServiceClient.GetClickView(request);
     // End snippet
 }
        /// <summary>Snippet for GetClickViewAsync</summary>
        public async Task GetClickViewResourceNamesAsync()
        {
            // Snippet: GetClickViewAsync(ClickViewName, CallSettings)
            // Additional: GetClickViewAsync(ClickViewName, CancellationToken)
            // Create client
            ClickViewServiceClient clickViewServiceClient = await ClickViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            ClickViewName resourceName = ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]");
            // Make the request
            ClickView response = await clickViewServiceClient.GetClickViewAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for GetClickViewAsync</summary>
        public async Task GetClickViewRequestObjectAsync()
        {
            // Snippet: GetClickViewAsync(GetClickViewRequest, CallSettings)
            // Additional: GetClickViewAsync(GetClickViewRequest, CancellationToken)
            // Create client
            ClickViewServiceClient clickViewServiceClient = await ClickViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetClickViewRequest request = new GetClickViewRequest
            {
                ResourceNameAsClickViewName = ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"),
            };
            // Make the request
            ClickView response = await clickViewServiceClient.GetClickViewAsync(request);

            // End snippet
        }
        public async Task GetClickViewAsync()
        {
            Mock <ClickViewService.ClickViewServiceClient> mockGrpcClient = new Mock <ClickViewService.ClickViewServiceClient>(MockBehavior.Strict);
            GetClickViewRequest expectedRequest = new GetClickViewRequest
            {
                ResourceName = new ClickViewName("[CUSTOMER]", "[CLICK_VIEW]").ToString(),
            };
            ClickView expectedResponse = new ClickView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetClickViewAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <ClickView>(Task.FromResult(expectedResponse), null, null, null, null));
            ClickViewServiceClient client   = new ClickViewServiceClientImpl(mockGrpcClient.Object, null);
            string    formattedResourceName = new ClickViewName("[CUSTOMER]", "[CLICK_VIEW]").ToString();
            ClickView response = await client.GetClickViewAsync(formattedResourceName);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void GetClickView()
        {
            Mock <ClickViewService.ClickViewServiceClient> mockGrpcClient = new Mock <ClickViewService.ClickViewServiceClient>(MockBehavior.Strict);
            GetClickViewRequest expectedRequest = new GetClickViewRequest
            {
                ResourceName = new ClickViewName("[CUSTOMER]", "[CLICK_VIEW]").ToString(),
            };
            ClickView expectedResponse = new ClickView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetClickView(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            ClickViewServiceClient client   = new ClickViewServiceClientImpl(mockGrpcClient.Object, null);
            string    formattedResourceName = new ClickViewName("[CUSTOMER]", "[CLICK_VIEW]").ToString();
            ClickView response = client.GetClickView(formattedResourceName);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }