public void ListPlannableProducts() { moq::Mock <ReachPlanService.ReachPlanServiceClient> mockGrpcClient = new moq::Mock <ReachPlanService.ReachPlanServiceClient>(moq::MockBehavior.Strict); ListPlannableProductsRequest request = new ListPlannableProductsRequest { PlannableLocationId = "plannable_location_idbae428fa", }; ListPlannableProductsResponse expectedResponse = new ListPlannableProductsResponse { ProductMetadata = { new ProductMetadata(), }, }; mockGrpcClient.Setup(x => x.ListPlannableProducts(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); ReachPlanServiceClient client = new ReachPlanServiceClientImpl(mockGrpcClient.Object, null); ListPlannableProductsResponse response = client.ListPlannableProducts(request.PlannableLocationId); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary> /// Returns the list of per-location plannable YouTube ad formats with allowed /// targeting. /// </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 <ListPlannableProductsResponse> ListPlannableProductsAsync(ListPlannableProductsRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_ListPlannableProductsRequest(ref request, ref callSettings); return(_callListPlannableProducts.Async(request, callSettings)); }
partial void Modify_ListPlannableProductsRequest(ref ListPlannableProductsRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Returns the list of per-location plannable YouTube ad formats with allowed /// targeting. /// </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 <ListPlannableProductsResponse> ListPlannableProductsAsync(ListPlannableProductsRequest request, st::CancellationToken cancellationToken) => ListPlannableProductsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Returns the list of per-location plannable YouTube ad formats with allowed /// targeting. /// </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 <ListPlannableProductsResponse> ListPlannableProductsAsync(ListPlannableProductsRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();
/// <summary> /// Returns the list of per-location plannable YouTube ad formats with allowed /// targeting. /// </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> /// The RPC response. /// </returns> public virtual ListPlannableProductsResponse ListPlannableProducts( ListPlannableProductsRequest request, gaxgrpc::CallSettings callSettings = null) { throw new sys::NotImplementedException(); }