public async stt::Task ListActiveBreakpointsRequestObjectAsync()
        {
            moq::Mock <Controller2.Controller2Client> mockGrpcClient = new moq::Mock <Controller2.Controller2Client>(moq::MockBehavior.Strict);
            ListActiveBreakpointsRequest request = new ListActiveBreakpointsRequest
            {
                DebuggeeId       = "debuggee_id454a924a",
                WaitToken        = "wait_tokencb600154",
                SuccessOnTimeout = false,
            };
            ListActiveBreakpointsResponse expectedResponse = new ListActiveBreakpointsResponse
            {
                Breakpoints   = { new Breakpoint(), },
                NextWaitToken = "next_wait_token2855eb7e",
                WaitExpired   = false,
            };

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

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

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for ListActiveBreakpoints</summary>
 public void ListActiveBreakpoints()
 {
     // Snippet: ListActiveBreakpoints(string, CallSettings)
     // Create client
     Controller2Client controller2Client = Controller2Client.Create();
     // Initialize request argument(s)
     string debuggeeId = "";
     // Make the request
     ListActiveBreakpointsResponse response = controller2Client.ListActiveBreakpoints(debuggeeId);
     // End snippet
 }
        /// <summary>Snippet for ListActiveBreakpointsAsync</summary>
        public async Task ListActiveBreakpointsAsync()
        {
            // Snippet: ListActiveBreakpointsAsync(string, CallSettings)
            // Additional: ListActiveBreakpointsAsync(string, CancellationToken)
            // Create client
            Controller2Client controller2Client = await Controller2Client.CreateAsync();

            // Initialize request argument(s)
            string debuggeeId = "";
            // Make the request
            ListActiveBreakpointsResponse response = await controller2Client.ListActiveBreakpointsAsync(debuggeeId);

            // End snippet
        }
Example #4
0
 /// <summary>Snippet for ListActiveBreakpoints</summary>
 public void ListActiveBreakpoints_RequestObject()
 {
     // Snippet: ListActiveBreakpoints(ListActiveBreakpointsRequest,CallSettings)
     // Create client
     Controller2Client controller2Client = Controller2Client.Create();
     // Initialize request argument(s)
     ListActiveBreakpointsRequest request = new ListActiveBreakpointsRequest
     {
         DebuggeeId = "",
     };
     // Make the request
     ListActiveBreakpointsResponse response = controller2Client.ListActiveBreakpoints(request);
     // End snippet
 }
        public void ListBreakpoints_WaitTimeout()
        {
            var bpReq  = CreateBreakpointRequest();
            var bpResp = new ListActiveBreakpointsResponse
            {
                NextWaitToken = _waitToken,
                WaitExpired   = true,
            };

            _mockControllerClient.Setup(c => c.RegisterDebuggee(It.IsAny <Debuggee>(), null)).Returns(_response);
            _mockControllerClient.Setup(c => c.ListActiveBreakpoints(bpReq, null)).Returns(bpResp);

            _client.Register();
            Assert.Null(_client.ListBreakpoints());
            _mockControllerClient.VerifyAll();
        }
Example #6
0
        /// <summary>Snippet for ListActiveBreakpointsAsync</summary>
        public async Task ListActiveBreakpointsAsync_RequestObject()
        {
            // Snippet: ListActiveBreakpointsAsync(ListActiveBreakpointsRequest,CallSettings)
            // Create client
            Controller2Client controller2Client = await Controller2Client.CreateAsync();

            // Initialize request argument(s)
            ListActiveBreakpointsRequest request = new ListActiveBreakpointsRequest
            {
                DebuggeeId = "",
            };
            // Make the request
            ListActiveBreakpointsResponse response = await controller2Client.ListActiveBreakpointsAsync(request);

            // End snippet
        }
        /// <summary>Snippet for ListActiveBreakpointsAsync</summary>
        public async Task ListActiveBreakpointsAsync_RequestObject()
        {
            // Snippet: ListActiveBreakpointsAsync(ListActiveBreakpointsRequest, CallSettings)
            // Additional: ListActiveBreakpointsAsync(ListActiveBreakpointsRequest, CancellationToken)
            // Create client
            Controller2Client controller2Client = await Controller2Client.CreateAsync();

            // Initialize request argument(s)
            ListActiveBreakpointsRequest request = new ListActiveBreakpointsRequest
            {
                DebuggeeId       = "",
                WaitToken        = "",
                SuccessOnTimeout = false,
            };
            // Make the request
            ListActiveBreakpointsResponse response = await controller2Client.ListActiveBreakpointsAsync(request);

            // End snippet
        }
        public async Task ListActiveBreakpointsAsync2()
        {
            Mock <Controller2.Controller2Client> mockGrpcClient = new Mock <Controller2.Controller2Client>(MockBehavior.Strict);
            ListActiveBreakpointsRequest         request        = new ListActiveBreakpointsRequest
            {
                DebuggeeId = "debuggeeId-997255898",
            };
            ListActiveBreakpointsResponse expectedResponse = new ListActiveBreakpointsResponse
            {
                NextWaitToken = "nextWaitToken1006864251",
                WaitExpired   = false,
            };

            mockGrpcClient.Setup(x => x.ListActiveBreakpointsAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <ListActiveBreakpointsResponse>(Task.FromResult(expectedResponse), null, null, null, null));
            Controller2Client             client   = new Controller2ClientImpl(mockGrpcClient.Object, null);
            ListActiveBreakpointsResponse response = await client.ListActiveBreakpointsAsync(request);

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void ListActiveBreakpoints2()
        {
            Mock <Controller2.Controller2Client> mockGrpcClient = new Mock <Controller2.Controller2Client>(MockBehavior.Strict);
            ListActiveBreakpointsRequest         request        = new ListActiveBreakpointsRequest
            {
                DebuggeeId = "debuggeeId-997255898",
            };
            ListActiveBreakpointsResponse expectedResponse = new ListActiveBreakpointsResponse
            {
                NextWaitToken = "nextWaitToken1006864251",
                WaitExpired   = false,
            };

            mockGrpcClient.Setup(x => x.ListActiveBreakpoints(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            Controller2Client             client   = new Controller2ClientImpl(mockGrpcClient.Object, null);
            ListActiveBreakpointsResponse response = client.ListActiveBreakpoints(request);

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void ListActiveBreakpoints()
        {
            moq::Mock <Controller2.Controller2Client> mockGrpcClient = new moq::Mock <Controller2.Controller2Client>(moq::MockBehavior.Strict);
            ListActiveBreakpointsRequest request = new ListActiveBreakpointsRequest
            {
                DebuggeeId = "debuggee_id454a924a",
            };
            ListActiveBreakpointsResponse expectedResponse = new ListActiveBreakpointsResponse
            {
                Breakpoints   = { new Breakpoint(), },
                NextWaitToken = "next_wait_token2855eb7e",
                WaitExpired   = false,
            };

            mockGrpcClient.Setup(x => x.ListActiveBreakpoints(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            Controller2Client             client   = new Controller2ClientImpl(mockGrpcClient.Object, null);
            ListActiveBreakpointsResponse response = client.ListActiveBreakpoints(request.DebuggeeId);

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