public void SetBreakpoint2()
        {
            Mock <Debugger2.Debugger2Client> mockGrpcClient = new Mock <Debugger2.Debugger2Client>(MockBehavior.Strict);
            SetBreakpointRequest             request        = new SetBreakpointRequest
            {
                DebuggeeId    = "debuggeeId-997255898",
                Breakpoint    = new Breakpoint(),
                ClientVersion = "clientVersion-1506231196",
            };
            SetBreakpointResponse expectedResponse = new SetBreakpointResponse();

            mockGrpcClient.Setup(x => x.SetBreakpoint(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            Debugger2Client       client   = new Debugger2ClientImpl(mockGrpcClient.Object, null);
            SetBreakpointResponse response = client.SetBreakpoint(request);

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Exemple #2
0
        public void SetBreakpoint()
        {
            moq::Mock <Debugger2.Debugger2Client> mockGrpcClient = new moq::Mock <Debugger2.Debugger2Client>(moq::MockBehavior.Strict);
            SetBreakpointRequest request = new SetBreakpointRequest
            {
                DebuggeeId    = "debuggee_id454a924a",
                Breakpoint    = new Breakpoint(),
                ClientVersion = "client_version92be8ead",
            };
            SetBreakpointResponse expectedResponse = new SetBreakpointResponse
            {
                Breakpoint = new Breakpoint(),
            };

            mockGrpcClient.Setup(x => x.SetBreakpoint(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            Debugger2Client       client   = new Debugger2ClientImpl(mockGrpcClient.Object, null);
            SetBreakpointResponse response = client.SetBreakpoint(request.DebuggeeId, request.Breakpoint, request.ClientVersion);

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