public void ListDebuggees2()
        {
            Mock <Debugger2.Debugger2Client> mockGrpcClient = new Mock <Debugger2.Debugger2Client>(MockBehavior.Strict);
            ListDebuggeesRequest             request        = new ListDebuggeesRequest
            {
                Project       = "project-309310695",
                ClientVersion = "clientVersion-1506231196",
            };
            ListDebuggeesResponse expectedResponse = new ListDebuggeesResponse();

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

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Exemplo n.º 2
0
        public void ListDebuggees()
        {
            moq::Mock <Debugger2.Debugger2Client> mockGrpcClient = new moq::Mock <Debugger2.Debugger2Client>(moq::MockBehavior.Strict);
            ListDebuggeesRequest request = new ListDebuggeesRequest
            {
                Project       = "projectaa6ff846",
                ClientVersion = "client_version92be8ead",
            };
            ListDebuggeesResponse expectedResponse = new ListDebuggeesResponse
            {
                Debuggees = { new Debuggee(), },
            };

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

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