public void ListRequestObject() { moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient> mockGrpcClient = new moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient>(moq::MockBehavior.Strict); ListGlobalOrganizationOperationsRequest request = new ListGlobalOrganizationOperationsRequest { PageToken = "page_tokenf09e5538", MaxResults = 2806814450U, Filter = "filtere47ac9b2", OrderBy = "order_byb4d33ada", ParentId = "parent_id8279e36b", ReturnPartialSuccess = false, }; OperationList expectedResponse = new OperationList { Id = "id74b70bb8", Kind = "kindf7aa39d9", Warning = new Warning(), NextPageToken = "next_page_tokendbee0940", Items = { new Operation(), }, SelfLink = "self_link7e87f12d", }; mockGrpcClient.Setup(x => x.List(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); GlobalOrganizationOperationsClient client = new GlobalOrganizationOperationsClientImpl(mockGrpcClient.Object, null); OperationList response = client.List(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void List() { moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient> mockGrpcClient = new moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient>(moq::MockBehavior.Strict); ListGlobalOrganizationOperationsRequest request = new ListGlobalOrganizationOperationsRequest { }; OperationList expectedResponse = new OperationList { Id = "id74b70bb8", Kind = "kindf7aa39d9", Warning = new Warning(), NextPageToken = "next_page_tokendbee0940", Items = { new Operation(), }, SelfLink = "self_link7e87f12d", }; mockGrpcClient.Setup(x => x.List(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); GlobalOrganizationOperationsClient client = new GlobalOrganizationOperationsClientImpl(mockGrpcClient.Object, null); OperationList response = client.List(); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }