public void AggregatedList() { moq::Mock <GlobalOperations.GlobalOperationsClient> mockGrpcClient = new moq::Mock <GlobalOperations.GlobalOperationsClient>(moq::MockBehavior.Strict); AggregatedListGlobalOperationsRequest request = new AggregatedListGlobalOperationsRequest { Project = "projectaa6ff846", }; OperationAggregatedList expectedResponse = new OperationAggregatedList { Id = "id74b70bb8", Kind = "kindf7aa39d9", Warning = new Warning(), NextPageToken = "next_page_tokendbee0940", Items = { { "key8a0b6e3c", new OperationsScopedList() }, }, Unreachables = { "unreachables3ca950ee", }, SelfLink = "self_link7e87f12d", }; mockGrpcClient.Setup(x => x.AggregatedList(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); GlobalOperationsClient client = new GlobalOperationsClientImpl(mockGrpcClient.Object, null); OperationAggregatedList response = client.AggregatedList(request.Project); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedList() { // Snippet: AggregatedList(string, CallSettings) // Create client GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.Create(); // Initialize request argument(s) string project = ""; // Make the request OperationAggregatedList response = globalOperationsClient.AggregatedList(project); // End snippet }
/// <summary>Snippet for AggregatedListAsync</summary> public async Task AggregatedListAsync() { // Snippet: AggregatedListAsync(string, CallSettings) // Additional: AggregatedListAsync(string, CancellationToken) // Create client GlobalOperationsClient globalOperationsClient = await GlobalOperationsClient.CreateAsync(); // Initialize request argument(s) string project = ""; // Make the request OperationAggregatedList response = await globalOperationsClient.AggregatedListAsync(project); // End snippet }
public async stt::Task AggregatedListRequestObjectAsync() { moq::Mock <GlobalOperations.GlobalOperationsClient> mockGrpcClient = new moq::Mock <GlobalOperations.GlobalOperationsClient>(moq::MockBehavior.Strict); AggregatedListGlobalOperationsRequest request = new AggregatedListGlobalOperationsRequest { PageToken = "page_tokenf09e5538", MaxResults = 2806814450U, OrderBy = "order_byb4d33ada", Project = "projectaa6ff846", Filter = "filtere47ac9b2", IncludeAllScopes = false, ReturnPartialSuccess = false, }; OperationAggregatedList expectedResponse = new OperationAggregatedList { Id = "id74b70bb8", Kind = "kindf7aa39d9", Warning = new Warning(), NextPageToken = "next_page_tokendbee0940", Items = { { "key8a0b6e3c", new OperationsScopedList() }, }, Unreachables = { "unreachables3ca950ee", }, SelfLink = "self_link7e87f12d", }; mockGrpcClient.Setup(x => x.AggregatedListAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <OperationAggregatedList>(stt::Task.FromResult(expectedResponse), null, null, null, null)); GlobalOperationsClient client = new GlobalOperationsClientImpl(mockGrpcClient.Object, null); OperationAggregatedList responseCallSettings = await client.AggregatedListAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); OperationAggregatedList responseCancellationToken = await client.AggregatedListAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedListRequestObject() { // Snippet: AggregatedList(AggregatedListGlobalOperationsRequest, CallSettings) // Create client GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.Create(); // Initialize request argument(s) AggregatedListGlobalOperationsRequest request = new AggregatedListGlobalOperationsRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request OperationAggregatedList response = globalOperationsClient.AggregatedList(request); // End snippet }
/// <summary>Snippet for AggregatedListAsync</summary> public async Task AggregatedListRequestObjectAsync() { // Snippet: AggregatedListAsync(AggregatedListGlobalOperationsRequest, CallSettings) // Additional: AggregatedListAsync(AggregatedListGlobalOperationsRequest, CancellationToken) // Create client GlobalOperationsClient globalOperationsClient = await GlobalOperationsClient.CreateAsync(); // Initialize request argument(s) AggregatedListGlobalOperationsRequest request = new AggregatedListGlobalOperationsRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request OperationAggregatedList response = await globalOperationsClient.AggregatedListAsync(request); // End snippet }