Classes | Namespaces | Macros | Functions | Variables
test_client.cpp File Reference
#include "xmlrpcpp/XmlRpcClient.h"
#include "xmlrpcpp/XmlRpcValue.h"
#include "mock_socket.h"
#include <errno.h>
#include <climits>
#include <gtest/gtest.h>
Include dependency graph for test_client.cpp:

Go to the source code of this file.

Classes

class  XmlRpcClientForTest
 

Namespaces

 XmlRpc
 

Macros

#define TEST_STATE(state)   EXPECT_STREQ(#state, XmlRpcClientForTest::connectionStateStr(XmlRpcClientForTest::state))
 

Functions

int main (int argc, char **argv)
 
void XmlRpc::PrintTo (const XmlRpcClientForTest::ClientConnectionState &state, ::std::ostream *os)
 
bool sourceInList (XmlRpc::XmlRpcSource *source, const XmlRpc::XmlRpcDispatch::SourceList &list)
 
 TEST (XmlRpcClient, connectionStateStr)
 
 TEST (XmlRpcClient, generateRequest)
 
 TEST (XmlRpcClient, generateHeader)
 
 TEST_F (MockSocketTest, constructor)
 
 TEST_F (MockSocketTest, close_invalid_fd)
 
 TEST_F (MockSocketTest, close_valid_fd)
 
 TEST_F (MockSocketTest, close_destructor)
 
 TEST_F (MockSocketTest, setupConnection)
 
 TEST_F (MockSocketTest, setupConnection_eof)
 
 TEST_F (MockSocketTest, setupConnection_close)
 
 TEST_F (MockSocketTest, setupConnection_err)
 
 TEST_F (MockSocketTest, setupConnection_eor_reopen)
 
 TEST_F (MockSocketTest, doConnect)
 
 TEST_F (MockSocketTest, doConnect_socketerr)
 
 TEST_F (MockSocketTest, doConnect_nonBlockErr)
 
 TEST_F (MockSocketTest, doConnect_connectErr)
 
 TEST_F (MockSocketTest, writeRequest)
 
 TEST_F (MockSocketTest, writeRequest_partial)
 
 TEST_F (MockSocketTest, writeRequest_partial_error)
 
 TEST_F (MockSocketTest, writeRequest_error)
 
 TEST_F (MockSocketTest, readHeader)
 
 TEST_F (MockSocketTest, readHeader2)
 
 TEST_F (MockSocketTest, readHeader_only)
 
 TEST_F (MockSocketTest, readHeader_partial)
 
 TEST_F (MockSocketTest, readHeader_err)
 
 TEST_F (MockSocketTest, readHeader_eof)
 
 TEST_F (MockSocketTest, readHeader_partial_err)
 
 TEST_F (MockSocketTest, readHeader_oversize)
 
 TEST_F (MockSocketTest, readResponse_noop)
 
 TEST_F (MockSocketTest, readResponse)
 
 TEST_F (MockSocketTest, readResponse_partial)
 
 TEST_F (MockSocketTest, readResponse_err)
 
 TEST_F (MockSocketTest, readResponse_eof)
 

Variables

const std::string header
 
const std::string header2
 
const std::string header3
 
const std::string response
 

Macro Definition Documentation

◆ TEST_STATE

#define TEST_STATE (   state)    EXPECT_STREQ(#state, XmlRpcClientForTest::connectionStateStr(XmlRpcClientForTest::state))

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1131 of file test_client.cpp.

◆ sourceInList()

bool sourceInList ( XmlRpc::XmlRpcSource source,
const XmlRpc::XmlRpcDispatch::SourceList list 
)

Definition at line 72 of file test_client.cpp.

◆ TEST() [1/3]

TEST ( XmlRpcClient  ,
connectionStateStr   
)

Definition at line 86 of file test_client.cpp.

◆ TEST() [2/3]

TEST ( XmlRpcClient  ,
generateRequest   
)

Definition at line 410 of file test_client.cpp.

◆ TEST() [3/3]

TEST ( XmlRpcClient  ,
generateHeader   
)

Definition at line 500 of file test_client.cpp.

◆ TEST_F() [1/30]

TEST_F ( MockSocketTest  ,
constructor   
)

Definition at line 98 of file test_client.cpp.

◆ TEST_F() [2/30]

TEST_F ( MockSocketTest  ,
close_invalid_fd   
)

Definition at line 124 of file test_client.cpp.

◆ TEST_F() [3/30]

TEST_F ( MockSocketTest  ,
close_valid_fd   
)

Definition at line 136 of file test_client.cpp.

◆ TEST_F() [4/30]

TEST_F ( MockSocketTest  ,
close_destructor   
)

Definition at line 153 of file test_client.cpp.

◆ TEST_F() [5/30]

TEST_F ( MockSocketTest  ,
setupConnection   
)

Definition at line 181 of file test_client.cpp.

◆ TEST_F() [6/30]

TEST_F ( MockSocketTest  ,
setupConnection_eof   
)

Definition at line 207 of file test_client.cpp.

◆ TEST_F() [7/30]

TEST_F ( MockSocketTest  ,
setupConnection_close   
)

Definition at line 236 of file test_client.cpp.

◆ TEST_F() [8/30]

TEST_F ( MockSocketTest  ,
setupConnection_err   
)

Definition at line 266 of file test_client.cpp.

◆ TEST_F() [9/30]

TEST_F ( MockSocketTest  ,
setupConnection_eor_reopen   
)

Definition at line 292 of file test_client.cpp.

◆ TEST_F() [10/30]

TEST_F ( MockSocketTest  ,
doConnect   
)

Definition at line 342 of file test_client.cpp.

◆ TEST_F() [11/30]

TEST_F ( MockSocketTest  ,
doConnect_socketerr   
)

Definition at line 363 of file test_client.cpp.

◆ TEST_F() [12/30]

TEST_F ( MockSocketTest  ,
doConnect_nonBlockErr   
)

Definition at line 375 of file test_client.cpp.

◆ TEST_F() [13/30]

TEST_F ( MockSocketTest  ,
doConnect_connectErr   
)

Definition at line 391 of file test_client.cpp.

◆ TEST_F() [14/30]

TEST_F ( MockSocketTest  ,
writeRequest   
)

Definition at line 522 of file test_client.cpp.

◆ TEST_F() [15/30]

TEST_F ( MockSocketTest  ,
writeRequest_partial   
)

Definition at line 549 of file test_client.cpp.

◆ TEST_F() [16/30]

TEST_F ( MockSocketTest  ,
writeRequest_partial_error   
)

Definition at line 582 of file test_client.cpp.

◆ TEST_F() [17/30]

TEST_F ( MockSocketTest  ,
writeRequest_error   
)

Definition at line 616 of file test_client.cpp.

◆ TEST_F() [18/30]

TEST_F ( MockSocketTest  ,
readHeader   
)

Definition at line 673 of file test_client.cpp.

◆ TEST_F() [19/30]

TEST_F ( MockSocketTest  ,
readHeader2   
)

Definition at line 702 of file test_client.cpp.

◆ TEST_F() [20/30]

TEST_F ( MockSocketTest  ,
readHeader_only   
)

Definition at line 732 of file test_client.cpp.

◆ TEST_F() [21/30]

TEST_F ( MockSocketTest  ,
readHeader_partial   
)

Definition at line 760 of file test_client.cpp.

◆ TEST_F() [22/30]

TEST_F ( MockSocketTest  ,
readHeader_err   
)

Definition at line 798 of file test_client.cpp.

◆ TEST_F() [23/30]

TEST_F ( MockSocketTest  ,
readHeader_eof   
)

Definition at line 844 of file test_client.cpp.

◆ TEST_F() [24/30]

TEST_F ( MockSocketTest  ,
readHeader_partial_err   
)

Definition at line 890 of file test_client.cpp.

◆ TEST_F() [25/30]

TEST_F ( MockSocketTest  ,
readHeader_oversize   
)

Definition at line 930 of file test_client.cpp.

◆ TEST_F() [26/30]

TEST_F ( MockSocketTest  ,
readResponse_noop   
)

Definition at line 961 of file test_client.cpp.

◆ TEST_F() [27/30]

TEST_F ( MockSocketTest  ,
readResponse   
)

Definition at line 991 of file test_client.cpp.

◆ TEST_F() [28/30]

TEST_F ( MockSocketTest  ,
readResponse_partial   
)

Definition at line 1021 of file test_client.cpp.

◆ TEST_F() [29/30]

TEST_F ( MockSocketTest  ,
readResponse_err   
)

Definition at line 1068 of file test_client.cpp.

◆ TEST_F() [30/30]

TEST_F ( MockSocketTest  ,
readResponse_eof   
)

Definition at line 1096 of file test_client.cpp.

Variable Documentation

◆ header

const std::string header
Initial value:
= "HTTP/1.1 200 OK\r\n"
"Server: XMLRPC++ 0.7\r\n"
"Content-Type: text/xml\r\n"
"Content-length: 114\r\n\r\n"

Definition at line 641 of file test_client.cpp.

◆ header2

const std::string header2
Initial value:
= "HTTP/1.0 200 OK\r\n"
"Server: BaseHTTP/0.3 Python/2.7.6\r\n"
"Date: Mon, 30 Oct 2017 22:28:12 GMT\r\n"
"Content-type: text/xml\r\n"
"Content-length: 114\r\n\r\n"

Definition at line 646 of file test_client.cpp.

◆ header3

const std::string header3
Initial value:
= "HTTP/1.1 200 OK\r\n"
"Server: XMLRPC++ 0.7\r\n"
"Content-Type: text/xml\r\n"
"Content-length: "

Definition at line 652 of file test_client.cpp.

◆ response

const std::string response
Initial value:
= "<?xml version=\"1.0\"?>\r\n"
"<methodResponse><params><param>\r\n"
"<value>Hello</value>\r\n"
"</param></params></methodResponse>\r\n"

Definition at line 657 of file test_client.cpp.



xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix, Dirk Thomas
autogenerated on Mon Feb 28 2022 23:33:22