/// <summary>Snippet for GetConnectivityTest</summary>
 public void GetConnectivityTestRequestObject()
 {
     // Snippet: GetConnectivityTest(GetConnectivityTestRequest, CallSettings)
     // Create client
     ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
     // Initialize request argument(s)
     GetConnectivityTestRequest request = new GetConnectivityTestRequest {
         Name = "",
     };
     // Make the request
     ConnectivityTest response = reachabilityServiceClient.GetConnectivityTest(request);
     // End snippet
 }
        /// <summary>Snippet for GetConnectivityTestAsync</summary>
        public async Task GetConnectivityTestRequestObjectAsync()
        {
            // Snippet: GetConnectivityTestAsync(GetConnectivityTestRequest, CallSettings)
            // Additional: GetConnectivityTestAsync(GetConnectivityTestRequest, CancellationToken)
            // Create client
            ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetConnectivityTestRequest request = new GetConnectivityTestRequest {
                Name = "",
            };
            // Make the request
            ConnectivityTest response = await reachabilityServiceClient.GetConnectivityTestAsync(request);

            // End snippet
        }
        public async stt::Task GetConnectivityTestRequestObjectAsync()
        {
            moq::Mock <ReachabilityService.ReachabilityServiceClient> mockGrpcClient = new moq::Mock <ReachabilityService.ReachabilityServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetConnectivityTestRequest request = new GetConnectivityTestRequest
            {
                Name = "name1c9368b0",
            };
            ConnectivityTest expectedResponse = new ConnectivityTest
            {
                ConnectivityTestName = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]"),
                Description          = "description2cf9da67",
                Source          = new Endpoint(),
                Destination     = new Endpoint(),
                Protocol        = "protocola08b7881",
                RelatedProjects =
                {
                    "related_projectsf33be6e8",
                },
                DisplayName = "display_name137f65c2",
                Labels      =
                {
                    {
                        "key8a0b6e3c",
                        "value60c16320"
                    },
                },
                CreateTime          = new wkt::Timestamp(),
                UpdateTime          = new wkt::Timestamp(),
                ReachabilityDetails = new ReachabilityDetails(),
            };

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

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

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