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 <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, 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 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 1102 of file test_client.cpp.

◆ sourceInList()

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

Definition at line 71 of file test_client.cpp.

◆ TEST() [1/3]

TEST ( XmlRpcClient  ,
connectionStateStr   
)

Definition at line 85 of file test_client.cpp.

◆ TEST() [2/3]

TEST ( XmlRpcClient  ,
generateRequest   
)

Definition at line 409 of file test_client.cpp.

◆ TEST() [3/3]

TEST ( XmlRpcClient  ,
generateHeader   
)

Definition at line 499 of file test_client.cpp.

◆ TEST_F() [1/29]

TEST_F ( MockSocketTest  ,
constructor   
)

Definition at line 97 of file test_client.cpp.

◆ TEST_F() [2/29]

TEST_F ( MockSocketTest  ,
close_invalid_fd   
)

Definition at line 123 of file test_client.cpp.

◆ TEST_F() [3/29]

TEST_F ( MockSocketTest  ,
close_valid_fd   
)

Definition at line 135 of file test_client.cpp.

◆ TEST_F() [4/29]

TEST_F ( MockSocketTest  ,
close_destructor   
)

Definition at line 152 of file test_client.cpp.

◆ TEST_F() [5/29]

TEST_F ( MockSocketTest  ,
setupConnection   
)

Definition at line 180 of file test_client.cpp.

◆ TEST_F() [6/29]

TEST_F ( MockSocketTest  ,
setupConnection_eof   
)

Definition at line 206 of file test_client.cpp.

◆ TEST_F() [7/29]

TEST_F ( MockSocketTest  ,
setupConnection_close   
)

Definition at line 235 of file test_client.cpp.

◆ TEST_F() [8/29]

TEST_F ( MockSocketTest  ,
setupConnection_err   
)

Definition at line 265 of file test_client.cpp.

◆ TEST_F() [9/29]

TEST_F ( MockSocketTest  ,
setupConnection_eor_reopen   
)

Definition at line 291 of file test_client.cpp.

◆ TEST_F() [10/29]

TEST_F ( MockSocketTest  ,
doConnect   
)

Definition at line 341 of file test_client.cpp.

◆ TEST_F() [11/29]

TEST_F ( MockSocketTest  ,
doConnect_socketerr   
)

Definition at line 362 of file test_client.cpp.

◆ TEST_F() [12/29]

TEST_F ( MockSocketTest  ,
doConnect_nonBlockErr   
)

Definition at line 374 of file test_client.cpp.

◆ TEST_F() [13/29]

TEST_F ( MockSocketTest  ,
doConnect_connectErr   
)

Definition at line 390 of file test_client.cpp.

◆ TEST_F() [14/29]

TEST_F ( MockSocketTest  ,
writeRequest   
)

Definition at line 521 of file test_client.cpp.

◆ TEST_F() [15/29]

TEST_F ( MockSocketTest  ,
writeRequest_partial   
)

Definition at line 548 of file test_client.cpp.

◆ TEST_F() [16/29]

TEST_F ( MockSocketTest  ,
writeRequest_partial_error   
)

Definition at line 581 of file test_client.cpp.

◆ TEST_F() [17/29]

TEST_F ( MockSocketTest  ,
writeRequest_error   
)

Definition at line 615 of file test_client.cpp.

◆ TEST_F() [18/29]

TEST_F ( MockSocketTest  ,
readHeader   
)

Definition at line 667 of file test_client.cpp.

◆ TEST_F() [19/29]

TEST_F ( MockSocketTest  ,
readHeader2   
)

Definition at line 696 of file test_client.cpp.

◆ TEST_F() [20/29]

TEST_F ( MockSocketTest  ,
readHeader_only   
)

Definition at line 726 of file test_client.cpp.

◆ TEST_F() [21/29]

TEST_F ( MockSocketTest  ,
readHeader_partial   
)

Definition at line 754 of file test_client.cpp.

◆ TEST_F() [22/29]

TEST_F ( MockSocketTest  ,
readHeader_err   
)

Definition at line 792 of file test_client.cpp.

◆ TEST_F() [23/29]

TEST_F ( MockSocketTest  ,
readHeader_eof   
)

Definition at line 838 of file test_client.cpp.

◆ TEST_F() [24/29]

TEST_F ( MockSocketTest  ,
readHeader_partial_err   
)

Definition at line 884 of file test_client.cpp.

◆ TEST_F() [25/29]

TEST_F ( MockSocketTest  ,
readResponse_noop   
)

Definition at line 932 of file test_client.cpp.

◆ TEST_F() [26/29]

TEST_F ( MockSocketTest  ,
readResponse   
)

Definition at line 962 of file test_client.cpp.

◆ TEST_F() [27/29]

TEST_F ( MockSocketTest  ,
readResponse_partial   
)

Definition at line 992 of file test_client.cpp.

◆ TEST_F() [28/29]

TEST_F ( MockSocketTest  ,
readResponse_err   
)

Definition at line 1039 of file test_client.cpp.

◆ TEST_F() [29/29]

TEST_F ( MockSocketTest  ,
readResponse_eof   
)

Definition at line 1067 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 640 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 645 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 651 of file test_client.cpp.



xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix
autogenerated on Thu Apr 25 2019 02:30:42