public void MutateAssetGroupSignals()
        {
            moq::Mock <AssetGroupSignalService.AssetGroupSignalServiceClient> mockGrpcClient = new moq::Mock <AssetGroupSignalService.AssetGroupSignalServiceClient>(moq::MockBehavior.Strict);
            MutateAssetGroupSignalsRequest request = new MutateAssetGroupSignalsRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operations =
                {
                    new AssetGroupSignalOperation(),
                },
            };
            MutateAssetGroupSignalsResponse expectedResponse = new MutateAssetGroupSignalsResponse
            {
                Results =
                {
                    new MutateAssetGroupSignalResult(),
                },
                PartialFailureError = new gr::Status(),
            };

            mockGrpcClient.Setup(x => x.MutateAssetGroupSignals(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            AssetGroupSignalServiceClient   client   = new AssetGroupSignalServiceClientImpl(mockGrpcClient.Object, null);
            MutateAssetGroupSignalsResponse response = client.MutateAssetGroupSignals(request.CustomerId, request.Operations);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task MutateAssetGroupSignalsRequestObjectAsync()
        {
            moq::Mock <AssetGroupSignalService.AssetGroupSignalServiceClient> mockGrpcClient = new moq::Mock <AssetGroupSignalService.AssetGroupSignalServiceClient>(moq::MockBehavior.Strict);
            MutateAssetGroupSignalsRequest request = new MutateAssetGroupSignalsRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operations =
                {
                    new AssetGroupSignalOperation(),
                },
                PartialFailure      = false,
                ValidateOnly        = true,
                ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly,
            };
            MutateAssetGroupSignalsResponse expectedResponse = new MutateAssetGroupSignalsResponse
            {
                Results =
                {
                    new MutateAssetGroupSignalResult(),
                },
                PartialFailureError = new gr::Status(),
            };

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

            Assert.AreEqual(expectedResponse, responseCallSettings);
            MutateAssetGroupSignalsResponse responseCancellationToken = await client.MutateAssetGroupSignalsAsync(request, st::CancellationToken.None);

            Assert.AreEqual(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
Example #3
0
 /// <summary>
 /// Creates or removes asset group signals. Operation statuses are
 /// returned.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public override stt::Task <MutateAssetGroupSignalsResponse> MutateAssetGroupSignalsAsync(MutateAssetGroupSignalsRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_MutateAssetGroupSignalsRequest(ref request, ref callSettings);
     return(_callMutateAssetGroupSignals.Async(request, callSettings));
 }
Example #4
0
 partial void Modify_MutateAssetGroupSignalsRequest(ref MutateAssetGroupSignalsRequest request, ref gaxgrpc::CallSettings settings);
Example #5
0
 /// <summary>
 /// Creates or removes asset group signals. Operation statuses are
 /// returned.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <MutateAssetGroupSignalsResponse> MutateAssetGroupSignalsAsync(MutateAssetGroupSignalsRequest request, st::CancellationToken cancellationToken) =>
 MutateAssetGroupSignalsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
Example #6
0
 /// <summary>
 /// Creates or removes asset group signals. Operation statuses are
 /// returned.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <MutateAssetGroupSignalsResponse> MutateAssetGroupSignalsAsync(MutateAssetGroupSignalsRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();