public async stt::Task GetTableRequestObjectAsync()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            GetTableRequest request = new GetTableRequest
            {
                Name = "name1c9368b0",
            };
            Table expectedResponse = new Table
            {
                TableName   = TableName.FromTable("[TABLE]"),
                DisplayName = "display_name137f65c2",
                Columns     =
                {
                    new ColumnDescription(),
                },
            };

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

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

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for GetTable</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetTableResourceNames()
 {
     // Create client
     TablesServiceClient tablesServiceClient = TablesServiceClient.Create();
     // Initialize request argument(s)
     TableName name = TableName.FromTable("[TABLE]");
     // Make the request
     Table response = tablesServiceClient.GetTable(name);
 }
예제 #3
0
        /// <summary>Snippet for GetTableAsync</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 GetTableResourceNamesAsync()
        {
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            TableName name = TableName.FromTable("[TABLE]");
            // Make the request
            Table response = await tablesServiceClient.GetTableAsync(name);
        }
 /// <summary>Snippet for GetTable</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetTableRequestObject()
 {
     // Create client
     TablesServiceClient tablesServiceClient = TablesServiceClient.Create();
     // Initialize request argument(s)
     GetTableRequest request = new GetTableRequest
     {
         TableName = TableName.FromTable("[TABLE]"),
     };
     // Make the request
     Table response = tablesServiceClient.GetTable(request);
 }
예제 #5
0
        /// <summary>Snippet for GetTableAsync</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 GetTableRequestObjectAsync()
        {
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetTableRequest request = new GetTableRequest
            {
                TableName = TableName.FromTable("[TABLE]"),
            };
            // Make the request
            Table response = await tablesServiceClient.GetTableAsync(request);
        }
예제 #6
0
        /// <summary>Snippet for GetTableAsync</summary>
        public async Task GetTableResourceNamesAsync()
        {
            // Snippet: GetTableAsync(TableName, CallSettings)
            // Additional: GetTableAsync(TableName, CancellationToken)
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            TableName name = TableName.FromTable("[TABLE]");
            // Make the request
            Table response = await tablesServiceClient.GetTableAsync(name);

            // End snippet
        }
예제 #7
0
        /// <summary>Snippet for GetTableAsync</summary>
        public async Task GetTableRequestObjectAsync()
        {
            // Snippet: GetTableAsync(GetTableRequest, CallSettings)
            // Additional: GetTableAsync(GetTableRequest, CancellationToken)
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetTableRequest request = new GetTableRequest
            {
                TableName = TableName.FromTable("[TABLE]"),
            };
            // Make the request
            Table response = await tablesServiceClient.GetTableAsync(request);

            // End snippet
        }
예제 #8
0
        /// <summary>Snippet for BatchDeleteRows</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void BatchDeleteRowsRequestObject()
        {
            // Create client
            TablesServiceClient tablesServiceClient = TablesServiceClient.Create();
            // Initialize request argument(s)
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };

            // Make the request
            tablesServiceClient.BatchDeleteRows(request);
        }
        public void BatchDeleteRowsRequestObject()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

            client.BatchDeleteRows(request);
            mockGrpcClient.VerifyAll();
        }
예제 #10
0
        /// <summary>Snippet for BatchDeleteRowsAsync</summary>
        public async Task BatchDeleteRowsRequestObjectAsync()
        {
            // Snippet: BatchDeleteRowsAsync(BatchDeleteRowsRequest, CallSettings)
            // Additional: BatchDeleteRowsAsync(BatchDeleteRowsRequest, CancellationToken)
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };
            // Make the request
            await tablesServiceClient.BatchDeleteRowsAsync(request);

            // End snippet
        }
        public async stt::Task BatchDeleteRowsRequestObjectAsync()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

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

            mockGrpcClient.VerifyAll();
        }
        public void GetTable()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            GetTableRequest request = new GetTableRequest
            {
                Name = "name1c9368b0",
            };
            Table expectedResponse = new Table
            {
                TableName   = TableName.FromTable("[TABLE]"),
                DisplayName = "display_name137f65c2",
                Columns     =
                {
                    new ColumnDescription(),
                },
            };

            mockGrpcClient.Setup(x => x.GetTable(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            TablesServiceClient client = new TablesServiceClientImpl(mockGrpcClient.Object, null);
            Table response             = client.GetTable(request.Name);

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