Пример #1
0
        public void DeleteBreakpoint()
        {
            moq::Mock <Debugger2.Debugger2Client> mockGrpcClient = new moq::Mock <Debugger2.Debugger2Client>(moq::MockBehavior.Strict);
            DeleteBreakpointRequest request = new DeleteBreakpointRequest
            {
                DebuggeeId    = "debuggee_id454a924a",
                BreakpointId  = "breakpoint_id5b0a5ee2",
                ClientVersion = "client_version92be8ead",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteBreakpoint(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            Debugger2Client client = new Debugger2ClientImpl(mockGrpcClient.Object, null);

            client.DeleteBreakpoint(request.DebuggeeId, request.BreakpointId, request.ClientVersion);
            mockGrpcClient.VerifyAll();
        }
        public void DeleteBreakpoint2()
        {
            Mock <Debugger2.Debugger2Client> mockGrpcClient = new Mock <Debugger2.Debugger2Client>(MockBehavior.Strict);
            DeleteBreakpointRequest          request        = new DeleteBreakpointRequest
            {
                DebuggeeId    = "debuggeeId-997255898",
                BreakpointId  = "breakpointId498424873",
                ClientVersion = "clientVersion-1506231196",
            };
            Empty expectedResponse = new Empty();

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

            client.DeleteBreakpoint(request);
            mockGrpcClient.VerifyAll();
        }