public void BatchRunPivotReportsRequestObject() { moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict); BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Entity = new Entity(), Requests = { new RunPivotReportRequest(), }, }; BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse { PivotReports = { new RunPivotReportResponse(), }, }; mockGrpcClient.Setup(x => x.BatchRunPivotReports(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunPivotReportsResponse response = client.BatchRunPivotReports(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async stt::Task BatchRunPivotReportsRequestObjectAsync() { moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict); BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Entity = new Entity(), Requests = { new RunPivotReportRequest(), }, }; BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse { PivotReports = { new RunPivotReportResponse(), }, }; mockGrpcClient.Setup(x => x.BatchRunPivotReportsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <BatchRunPivotReportsResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunPivotReportsResponse responseCallSettings = await client.BatchRunPivotReportsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); BatchRunPivotReportsResponse responseCancellationToken = await client.BatchRunPivotReportsAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
public void BatchRunPivotReportsRequestObject() { moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict); BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Property = "propertyc9b48d1a", Requests = { new RunPivotReportRequest(), }, }; BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse { PivotReports = { new RunPivotReportResponse(), }, Kind = "kindf7aa39d9", }; mockGrpcClient.Setup(x => x.BatchRunPivotReports(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); BetaAnalyticsDataClient client = new BetaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunPivotReportsResponse response = client.BatchRunPivotReports(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for BatchRunPivotReports</summary> public void BatchRunPivotReports_RequestObject() { // Snippet: BatchRunPivotReports(BatchRunPivotReportsRequest,CallSettings) // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create(); // Initialize request argument(s) BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest(); // Make the request BatchRunPivotReportsResponse response = alphaAnalyticsDataClient.BatchRunPivotReports(request); // End snippet }
/// <summary>Snippet for BatchRunPivotReportsAsync</summary> public async Task BatchRunPivotReportsAsync_RequestObject() { // Snippet: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest,CallSettings) // Additional: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest,CancellationToken) // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = await AlphaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest(); // Make the request BatchRunPivotReportsResponse response = await alphaAnalyticsDataClient.BatchRunPivotReportsAsync(request); // End snippet }
public async Task BatchRunPivotReportsAsync() { Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict); BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest(); BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse(); mockGrpcClient.Setup(x => x.BatchRunPivotReportsAsync(request, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <BatchRunPivotReportsResponse>(Task.FromResult(expectedResponse), null, null, null, null)); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunPivotReportsResponse response = await client.BatchRunPivotReportsAsync(request); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void BatchRunPivotReports() { Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict); BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest(); BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse(); mockGrpcClient.Setup(x => x.BatchRunPivotReports(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunPivotReportsResponse response = client.BatchRunPivotReports(request); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for BatchRunPivotReports</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void BatchRunPivotReportsRequestObject() { // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.Create(); // Initialize request argument(s) BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Property = "", Requests = { new RunPivotReportRequest(), }, }; // Make the request BatchRunPivotReportsResponse response = betaAnalyticsDataClient.BatchRunPivotReports(request); }
/// <summary>Snippet for BatchRunPivotReports</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void BatchRunPivotReportsRequestObject() { // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create(); // Initialize request argument(s) BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Entity = new Entity(), Requests = { new RunPivotReportRequest(), }, }; // Make the request BatchRunPivotReportsResponse response = alphaAnalyticsDataClient.BatchRunPivotReports(request); }
/// <summary>Snippet for BatchRunPivotReportsAsync</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 BatchRunPivotReportsRequestObjectAsync() { // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Property = "", Requests = { new RunPivotReportRequest(), }, }; // Make the request BatchRunPivotReportsResponse response = await betaAnalyticsDataClient.BatchRunPivotReportsAsync(request); }
/// <summary>Snippet for BatchRunPivotReportsAsync</summary> public async Task BatchRunPivotReportsRequestObjectAsync() { // Snippet: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest, CallSettings) // Additional: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest, CancellationToken) // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest { Property = "", Requests = { new RunPivotReportRequest(), }, }; // Make the request BatchRunPivotReportsResponse response = await betaAnalyticsDataClient.BatchRunPivotReportsAsync(request); // End snippet }