org::xmlBlaster::TestLogin Class Reference

Inheritance diagram for org::xmlBlaster::TestLogin:

Inheritance graph
[legend]
Collaboration diagram for org::xmlBlaster::TestLogin:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TestLogin (Global &global, string &senderName, string &secondName)
 Constructs the TestLogin object.
 ~TestLogin ()
string update (string &, UpdateKey &, unsigned char *, long, UpdateQos &)
 This is the callback method (I_Callback) invoked from CorbaConnection informing the client in an asynchronous mode about a new message.
void setUp (int args, char *argc[])
 Sets up the fixture.
void tearDown ()
 Tears down the fixture.
void testSubscribeXPath ()
 TEST: Subscribe to messages with XPATH.
void testPublish (bool ptp)
 TEST: Construct a message and publish it.
void testLoginLogout (int args=0, char *argc[]=0)
 TEST: Construct a message and publish it,
the previous XPath subscription should match and send an update.

Detailed Description

Definition at line 38 of file TestLogin.cpp.


Constructor & Destructor Documentation

org::xmlBlaster::TestLogin::TestLogin ( Global global,
string &  senderName,
string &  secondName 
)

Constructs the TestLogin object.

Parameters:
testName The name used in the test suite
loginName The name to login to the xmlBlaster
secondName The name to login to the xmlBlaster again

Definition at line 67 of file TestLogin.cpp.

org::xmlBlaster::TestLogin::~TestLogin (  ) 

Definition at line 83 of file TestLogin.cpp.


Member Function Documentation

string org::xmlBlaster::TestLogin::update ( string &  ,
UpdateKey ,
unsigned char *  ,
long  ,
UpdateQos  
)

This is the callback method (I_Callback) invoked from CorbaConnection informing the client in an asynchronous mode about a new message.

The raw CORBA-BlasterCallback.update() is unpacked and for each arrived message this update is called.

Parameters:
sessionId The sessionId to authenticate the callback This sessionId was passed on subscription we can use it to decide if we trust this update()
updateKey The arrived key
content The arrived message content
qos Quality of Service of the MessageUnit
Returns:
The status string

Definition at line 105 of file TestLogin.cpp.

References org::xmlBlaster::util::I_Log::call().

void org::xmlBlaster::TestLogin::setUp ( int  args,
char *  argc[] 
)

Sets up the fixture.

Connect to xmlBlaster and login

Definition at line 119 of file TestLogin.cpp.

References serverIdl::MessageUnit::content, org::xmlBlaster::util::I_Log::error(), to_string(), and serverIdl::MessageUnit::xmlKey.

Referenced by main(), and testLoginLogout().

void org::xmlBlaster::TestLogin::tearDown (  ) 

Tears down the fixture.

cleaning up .... erase() the previous message OID and logout

Definition at line 166 of file TestLogin.cpp.

References org::xmlBlaster::client::protocol::corba::CorbaConnection::erase(), org::xmlBlaster::util::I_Log::error(), serverIdl::XmlBlasterException::errorCodeStr, and serverIdl::XmlBlasterException::message.

Referenced by main().

void org::xmlBlaster::TestLogin::testSubscribeXPath (  ) 

TEST: Subscribe to messages with XPATH.

The returned subscribeOid is checked

Definition at line 211 of file TestLogin.cpp.

References serverIdl::XmlBlasterException::errorCodeStr, org::xmlBlaster::util::I_Log::info(), serverIdl::XmlBlasterException::message, org::xmlBlaster::client::protocol::corba::CorbaConnection::subscribe(), org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().

Referenced by testLoginLogout().

void org::xmlBlaster::TestLogin::testPublish ( bool  ptp  ) 

TEST: Construct a message and publish it.

The returned publishOid is checked

Parameters:
ptp Use the Point to Point style

Definition at line 249 of file TestLogin.cpp.

References serverIdl::XmlBlasterException::errorCodeStr, serverIdl::XmlBlasterException::message, org::xmlBlaster::client::protocol::corba::CorbaConnection::publish(), serverIdl::MessageUnit::qos, org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().

Referenced by testLoginLogout().

void org::xmlBlaster::TestLogin::testLoginLogout ( int  args = 0,
char *  argc[] = 0 
)

TEST: Construct a message and publish it,
the previous XPath subscription should match and send an update.

Definition at line 289 of file TestLogin.cpp.

References serverIdl::MessageUnit::content, serverIdl::XmlBlasterException::errorCodeStr, org::xmlBlaster::util::I_Log::info(), serverIdl::XmlBlasterException::message, org::xmlBlaster::client::protocol::corba::CorbaConnection::publish(), serverIdl::MessageUnit::qos, setUp(), testPublish(), testSubscribeXPath(), org::xmlBlaster::util::StopWatch::wait(), org::xmlBlaster::util::I_Log::warn(), and serverIdl::MessageUnit::xmlKey.

Referenced by main().


The documentation for this class was generated from the following file: