public void GetBreakpoint2()
        {
            Mock <Debugger2.Debugger2Client> mockGrpcClient = new Mock <Debugger2.Debugger2Client>(MockBehavior.Strict);
            GetBreakpointRequest             request        = new GetBreakpointRequest
            {
                DebuggeeId    = "debuggeeId-997255898",
                BreakpointId  = "breakpointId498424873",
                ClientVersion = "clientVersion-1506231196",
            };
            GetBreakpointResponse expectedResponse = new GetBreakpointResponse();

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

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Пример #2
0
        public void GetBreakpoint()
        {
            moq::Mock <Debugger2.Debugger2Client> mockGrpcClient = new moq::Mock <Debugger2.Debugger2Client>(moq::MockBehavior.Strict);
            GetBreakpointRequest request = new GetBreakpointRequest
            {
                DebuggeeId    = "debuggee_id454a924a",
                BreakpointId  = "breakpoint_id5b0a5ee2",
                ClientVersion = "client_version92be8ead",
            };
            GetBreakpointResponse expectedResponse = new GetBreakpointResponse
            {
                Breakpoint = new Breakpoint(),
            };

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

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