activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r508103 [2/2] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/connector/ main/activemq/connector/openwire/ main/activemq/connector/openwire/commands/ main/activemq/connector/stomp/ main/activemq/core/ test/activemq/connect...
Date Thu, 15 Feb 2007 19:42:06 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h?view=diff&rev=508103&r1=508102&r2=508103
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
Thu Feb 15 11:42:05 2007
@@ -48,38 +48,38 @@
         CPPUNIT_TEST_SUITE_END();
 
     public:
-    
+
         typedef std::pair< std::string, std::string > MyProperty;
-    
+
         class MyCommandListener : public transport::CommandListener{
         public:
-        
+
             transport::Command* cmd;
             commands::SubscribeCommand* subscribe;
-            
+
             // Properties that should be in an command
             std::vector< MyProperty > expected;
-            
+
         public:
-        
+
             MyCommandListener(){
                 cmd = NULL;
                 subscribe = NULL;
             }
             virtual ~MyCommandListener(){}
-            
+
             virtual void onCommand( transport::Command* command ){
                 cmd = command;
 
                 subscribe = dynamic_cast< commands::SubscribeCommand* >( command );
                 if( subscribe )
                 {
-                    const util::Properties& properties = 
+                    const util::Properties& properties =
                         subscribe->getProperties();
-                    
+
                     for( size_t ix = 0; ix < expected.size(); ++ix )
                     {
-                        std::string value = 
+                        std::string value =
                             properties.getProperty( expected[ix].first, "" );
 
                         CPPUNIT_ASSERT( value == expected[ix].second );
@@ -87,15 +87,15 @@
                 }
             }
         };
-        
+
         class MyMessageListener : public ConsumerMessageListener{
         public:
-        
+
             std::vector<ConsumerInfo*> consumers;
-            
+
         public:
             virtual ~MyMessageListener(){}
-            
+
             virtual void onConsumerMessage( ConsumerInfo* consumer,
                 core::ActiveMQMessage* msg )
             {
@@ -113,126 +113,126 @@
             StompResponseBuilder responseBuilder("testSessionId");
             transport::DummyTransport transport( &responseBuilder );
             StompSessionManager manager( connectionId, &transport );
-            
+
             SessionInfo* info1 = manager.createSession( cms::Session::AUTO_ACKNOWLEDGE );
             CPPUNIT_ASSERT( info1->getAckMode() == cms::Session::AUTO_ACKNOWLEDGE );
             CPPUNIT_ASSERT( info1->getConnectionId() == connectionId );
-            
+
             SessionInfo* info2 = manager.createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
             CPPUNIT_ASSERT( info2->getAckMode() == cms::Session::DUPS_OK_ACKNOWLEDGE );
             CPPUNIT_ASSERT( info2->getConnectionId() == connectionId );
-            
+
             SessionInfo* info3 = manager.createSession( cms::Session::CLIENT_ACKNOWLEDGE
);
             CPPUNIT_ASSERT( info3->getAckMode() == cms::Session::CLIENT_ACKNOWLEDGE );
             CPPUNIT_ASSERT( info3->getConnectionId() == connectionId );
-            
+
             SessionInfo* info4 = manager.createSession( cms::Session::SESSION_TRANSACTED
);
             CPPUNIT_ASSERT( info4->getAckMode() == cms::Session::SESSION_TRANSACTED );
             CPPUNIT_ASSERT( info4->getConnectionId() == connectionId );
-            
+
             delete info1;
             delete info2;
             delete info3;
             delete info4;
         }
-        
+
         void testConsumers()
         {
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testSessionId");
             transport::DummyTransport transport( &responseBuilder );
             StompSessionManager manager( connectionId, &transport );
-            
+
             SessionInfo* info1 = manager.createSession( cms::Session::AUTO_ACKNOWLEDGE );
             std::string sel1 = "";
             StompTopic dest1( "dummy.topic.1" );
             ConsumerInfo* cinfo1 = manager.createConsumer( &dest1, info1, sel1 );
             CPPUNIT_ASSERT( cinfo1->getSessionInfo() == info1 );
-            CPPUNIT_ASSERT( cinfo1->getDestination().toProviderString() == dest1.toProviderString()
);
+            CPPUNIT_ASSERT( cinfo1->getDestination()->toProviderString() == dest1.toProviderString()
);
             CPPUNIT_ASSERT( cinfo1->getMessageSelector() == sel1 );
-            
+
             SessionInfo* info2 = manager.createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
             std::string sel2 = "mysel2";
             StompTopic dest2( "dummy.topic.2" );
             ConsumerInfo* cinfo2 = manager.createConsumer( &dest2, info2, sel2 );
             CPPUNIT_ASSERT( cinfo2->getSessionInfo() == info2 );
-            CPPUNIT_ASSERT( cinfo2->getDestination().toProviderString() == dest2.toProviderString()
);
+            CPPUNIT_ASSERT( cinfo2->getDestination()->toProviderString() == dest2.toProviderString()
);
             CPPUNIT_ASSERT( cinfo2->getMessageSelector() == sel2 );
-            
+
             SessionInfo* info3 = manager.createSession( cms::Session::CLIENT_ACKNOWLEDGE
);
             std::string sel3 = "mysel3";
             StompQueue dest3( "dummy.queue.1" );
             ConsumerInfo* cinfo3 = manager.createConsumer( &dest3, info3, sel3 );
             CPPUNIT_ASSERT( cinfo3->getSessionInfo() == info3 );
-            CPPUNIT_ASSERT( cinfo3->getDestination().toProviderString() == dest3.toProviderString()
);
+            CPPUNIT_ASSERT( cinfo3->getDestination()->toProviderString() == dest3.toProviderString()
);
             CPPUNIT_ASSERT( cinfo3->getMessageSelector() == sel3 );
-            
+
             SessionInfo* info4 = manager.createSession( cms::Session::SESSION_TRANSACTED
);
             std::string sel4 = "";
             StompTopic dest4( "dummy.queue.2" );
             ConsumerInfo* cinfo4 = manager.createConsumer( &dest4, info4, sel4 );
             CPPUNIT_ASSERT( cinfo4->getSessionInfo() == info4 );
-            CPPUNIT_ASSERT( cinfo4->getDestination().toProviderString() == dest4.toProviderString()
);
+            CPPUNIT_ASSERT( cinfo4->getDestination()->toProviderString() == dest4.toProviderString()
);
             CPPUNIT_ASSERT( cinfo4->getMessageSelector() == sel4 );
-            
+
             delete info1;
             delete info2;
             delete info3;
             delete info4;
-            
+
             delete cinfo1;
             delete cinfo2;
             delete cinfo3;
             delete cinfo4;
         }
-        
+
         void testCommand()
         {
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testSessionId");
             transport::DummyTransport transport( &responseBuilder );
             StompSessionManager manager( connectionId, &transport );
-            
+
             StompTopic dest1( "dummy.topic" );
             StompTopic dest2( "dummy.topic2" );
-            
+
             SessionInfo* info1 = manager.createSession( cms::Session::AUTO_ACKNOWLEDGE );
             ConsumerInfo* cinfo1 = manager.createConsumer( &dest1, info1, "" );
-            
+
             SessionInfo* info2 = manager.createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
             ConsumerInfo* cinfo2 = manager.createConsumer( &dest1, info2, "" );
-            
+
             SessionInfo* info3 = manager.createSession( cms::Session::CLIENT_ACKNOWLEDGE
);
             ConsumerInfo* cinfo3 = manager.createConsumer( &dest2, info3, "" );
-            
+
             SessionInfo* info4 = manager.createSession( cms::Session::SESSION_TRANSACTED
);
             ConsumerInfo* cinfo4 = manager.createConsumer( &dest2, info4, "" );
-            
+
             MyMessageListener listener;
             manager.setConsumerMessageListener( &listener );
-            
+
             commands::TextMessageCommand* msg = new commands::TextMessageCommand();
             msg->setCMSDestination( &dest1 );
-            msg->setText( "hello world" );                        
+            msg->setText( "hello world" );
             manager.onStompCommand( msg );
-            
+
             CPPUNIT_ASSERT( listener.consumers.size() == 2 );
             for( unsigned int ix=0; ix<listener.consumers.size(); ++ix ){
-                CPPUNIT_ASSERT( listener.consumers[ix] == cinfo1 || 
+                CPPUNIT_ASSERT( listener.consumers[ix] == cinfo1 ||
                     listener.consumers[ix] == cinfo2 );
             }
-            
+
             // Clean up the consumers list
             listener.consumers.clear();
-            
+
             msg = new commands::TextMessageCommand();
             msg->setCMSDestination( &dest2 );
             msg->setText( "hello world" );
             manager.onStompCommand( msg );
-            
+
             CPPUNIT_ASSERT( listener.consumers.size() == 2 );
             for( unsigned int ix=0; ix<listener.consumers.size(); ++ix ){
-                CPPUNIT_ASSERT( listener.consumers[ix] == cinfo3 || 
+                CPPUNIT_ASSERT( listener.consumers[ix] == cinfo3 ||
                     listener.consumers[ix] == cinfo4 );
             }
 
@@ -240,78 +240,78 @@
             delete info2;
             delete info3;
             delete info4;
-            
+
             delete cinfo1;
             delete cinfo2;
             delete cinfo3;
             delete cinfo4;
         }
-        
+
         void testSendingCommands(){
-            
-            
-            
+
+
+
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testSessionId");
             transport::DummyTransport transport( &responseBuilder );
             StompSessionManager manager( connectionId, &transport );
-            
+
             StompTopic dest1( "dummy.topic.1" );
-            
+
             MyCommandListener cmdListener;
             transport.setOutgoingCommandListener( &cmdListener );
-            
+
             SessionInfo* info1 = manager.createSession( cms::Session::AUTO_ACKNOWLEDGE );
-            ConsumerInfo* cinfo1 = manager.createConsumer( &dest1, info1, "" );     
              
+            ConsumerInfo* cinfo1 = manager.createConsumer( &dest1, info1, "" );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );
-            
+
             cmdListener.cmd = NULL;
-            
+
             SessionInfo* info2 = manager.createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
             ConsumerInfo* cinfo2 = manager.createConsumer( &dest1, info2, "" );
             CPPUNIT_ASSERT( cmdListener.cmd == NULL );
-            
+
             cmdListener.cmd = NULL;
-            
+
             manager.removeConsumer( cinfo1 );
             CPPUNIT_ASSERT( cmdListener.cmd == NULL );
-            
+
             cmdListener.cmd = NULL;
-            
+
             manager.removeConsumer( cinfo2 );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );
-            
+
             delete info1;
             delete info2;
-            
+
             delete cinfo1;
-            delete cinfo2;                      
+            delete cinfo2;
         }
-      
+
         void testSubscribeOptions(){
-            
+
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testSessionId");
             transport::DummyTransport transport( &responseBuilder );
             StompSessionManager manager( connectionId, &transport );
-            
-            MyProperty retroactive = 
+
+            MyProperty retroactive =
                 std::make_pair( "activemq.retroactive", "true" );
-            MyProperty prefetchSize = 
+            MyProperty prefetchSize =
                 std::make_pair( "activemq.prefetchSize", "1000" );
-            MyProperty maxPendingMsgLimit = 
+            MyProperty maxPendingMsgLimit =
                 std::make_pair( "activemq.maximumPendingMessageLimit", "0" );
-            MyProperty noLocal = 
+            MyProperty noLocal =
                 std::make_pair( "activemq.noLocal", "true" );
-            MyProperty dispatchAsync = 
+            MyProperty dispatchAsync =
                 std::make_pair( "activemq.dispatchAsync", "true" );
-            MyProperty selector = 
+            MyProperty selector =
                 std::make_pair( "selector", "test" );
-            MyProperty exclusive = 
+            MyProperty exclusive =
                 std::make_pair( "activemq.exclusive", "true" );
-            MyProperty priority = 
+            MyProperty priority =
                 std::make_pair( "activemq.priority", "1" );
-            
+
             SessionInfo* session = NULL;
             ConsumerInfo* consumer = NULL;
 
@@ -321,10 +321,10 @@
             session = manager.createSession( cms::Session::AUTO_ACKNOWLEDGE );
 
             cmdListener.expected.clear();
-            StompTopic dest1( "dummy.topic.1" );            
-            consumer = manager.createConsumer( &dest1, session, "" );               
    
+            StompTopic dest1( "dummy.topic.1" );
+            consumer = manager.createConsumer( &dest1, session, "" );
             CPPUNIT_ASSERT( consumer != NULL );
-            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );            
+            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );
 
             manager.removeConsumer( consumer );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );
@@ -333,11 +333,11 @@
             cmdListener.subscribe = NULL;
 
             cmdListener.expected.clear();
-            cmdListener.expected.push_back( retroactive );            
+            cmdListener.expected.push_back( retroactive );
             StompTopic dest2( "dummy.topic.1?consumer.retroactive=true" );
-            consumer = manager.createConsumer( &dest2, session, "" );               
    
+            consumer = manager.createConsumer( &dest2, session, "" );
             CPPUNIT_ASSERT( consumer != NULL );
-            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );            
+            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );
 
             manager.removeConsumer( consumer );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );
@@ -346,16 +346,16 @@
             cmdListener.subscribe = NULL;
 
             cmdListener.expected.clear();
-            cmdListener.expected.push_back( retroactive );         
-            cmdListener.expected.push_back( prefetchSize );         
-            cmdListener.expected.push_back( maxPendingMsgLimit );         
-            cmdListener.expected.push_back( noLocal );         
-            cmdListener.expected.push_back( dispatchAsync );         
-            cmdListener.expected.push_back( selector );         
-            cmdListener.expected.push_back( exclusive );         
-            cmdListener.expected.push_back( priority );         
-            StompTopic dest3( 
-                std::string( "dummy.topic.1?" ) + 
+            cmdListener.expected.push_back( retroactive );
+            cmdListener.expected.push_back( prefetchSize );
+            cmdListener.expected.push_back( maxPendingMsgLimit );
+            cmdListener.expected.push_back( noLocal );
+            cmdListener.expected.push_back( dispatchAsync );
+            cmdListener.expected.push_back( selector );
+            cmdListener.expected.push_back( exclusive );
+            cmdListener.expected.push_back( priority );
+            StompTopic dest3(
+                std::string( "dummy.topic.1?" ) +
                 "consumer.retroactive=" + retroactive.second + "&" +
                 "consumer.prefetchSize=" + prefetchSize.second + "&" +
                 "consumer.maximumPendingMessageLimit=" + maxPendingMsgLimit.second + "&"
+
@@ -364,9 +364,9 @@
                 "consumer.selector=" + selector.second + "&" +
                 "consumer.exclusive=" + exclusive.second + "&" +
                 "consumer.priority=" + priority.second );
-            consumer = manager.createConsumer( &dest3, session, "" );               
    
+            consumer = manager.createConsumer( &dest3, session, "" );
             CPPUNIT_ASSERT( consumer != NULL );
-            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );            
+            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );
 
             manager.removeConsumer( consumer );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );
@@ -375,16 +375,16 @@
             cmdListener.subscribe = NULL;
 
             cmdListener.expected.clear();
-            cmdListener.expected.push_back( retroactive );         
-            cmdListener.expected.push_back( prefetchSize );         
-            cmdListener.expected.push_back( maxPendingMsgLimit );         
-            cmdListener.expected.push_back( noLocal );         
-            cmdListener.expected.push_back( dispatchAsync );         
-            cmdListener.expected.push_back( selector );         
-            cmdListener.expected.push_back( exclusive );         
-            cmdListener.expected.push_back( priority );         
-            StompTopic dest4( 
-                std::string( "dummy.topic.1?" ) + 
+            cmdListener.expected.push_back( retroactive );
+            cmdListener.expected.push_back( prefetchSize );
+            cmdListener.expected.push_back( maxPendingMsgLimit );
+            cmdListener.expected.push_back( noLocal );
+            cmdListener.expected.push_back( dispatchAsync );
+            cmdListener.expected.push_back( selector );
+            cmdListener.expected.push_back( exclusive );
+            cmdListener.expected.push_back( priority );
+            StompTopic dest4(
+                std::string( "dummy.topic.1?" ) +
                 "consumer.retroactive=" + retroactive.second + "&" +
                 "consumer.prefetchSize=" + prefetchSize.second + "&" +
                 "consumer.maximumPendingMessageLimit=" + maxPendingMsgLimit.second + "&"
+
@@ -392,9 +392,9 @@
                 "consumer.selector=" + selector.second + "&" +
                 "consumer.exclusive=" + exclusive.second + "&" +
                 "consumer.priority=" + priority.second );
-            consumer = manager.createConsumer( &dest4, session, "", true );         
          
+            consumer = manager.createConsumer( &dest4, session, "", true );
             CPPUNIT_ASSERT( consumer != NULL );
-            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );            
+            CPPUNIT_ASSERT( cmdListener.subscribe != NULL );
 
             manager.removeConsumer( consumer );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h?view=diff&rev=508103&r1=508102&r2=508103
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
Thu Feb 15 11:42:05 2007
@@ -62,32 +62,32 @@
 
         class MyCommandListener : public transport::CommandListener{
         public:
-        
+
             transport::Command* cmd;
-            
+
         public:
-        
+
             MyCommandListener(){
                 cmd = NULL;
             }
             virtual ~MyCommandListener(){}
-            
+
             virtual void onCommand( transport::Command* command ){
                 cmd = command;
             }
         };
-        
-        class MyMessageListener : 
+
+        class MyMessageListener :
             public connector::ConsumerMessageListener
         {
         public:
-        
+
             std::vector<connector::ConsumerInfo*> consumers;
-            
+
         public:
             virtual ~MyMessageListener(){}
-            
-            virtual void onConsumerMessage( 
+
+            virtual void onConsumerMessage(
                 connector::ConsumerInfo* consumer,
                 core::ActiveMQMessage* msg AMQCPP_UNUSED )
             {
@@ -97,28 +97,28 @@
 
         class MyExceptionListener : public cms::ExceptionListener{
         public:
-        
+
             bool caughtOne;
 
         public:
-        
+
             MyExceptionListener(){ caughtOne = false; }
             virtual ~MyExceptionListener(){}
-            
+
             virtual void onException(const cms::CMSException& ex AMQCPP_UNUSED){
                 caughtOne = true;
             }
         };
-        
+
         class MyActiveMQMessageListener : public ActiveMQMessageListener
         {
         public:
-        
+
             std::vector<ActiveMQMessage*> messages;
-            
+
         public:
             virtual ~MyActiveMQMessageListener(){}
-            
+
             virtual void onActiveMQMessage( ActiveMQMessage* message )
                 throw ( exceptions::ActiveMQException )
             {
@@ -138,37 +138,37 @@
                 MyCommandListener cmdListener;
                 MyActiveMQMessageListener msgListener;
                 std::string connectionId = "testConnectionId";
-                util::SimpleProperties* properties = 
+                util::SimpleProperties* properties =
                     new util::SimpleProperties();
                 transport::Transport* transport = NULL;
-    
-                transport::TransportFactory* factory = 
-                    transport::TransportFactoryMap::getInstance().lookup( 
+
+                transport::TransportFactory* factory =
+                    transport::TransportFactoryMap::getInstance().lookup(
                         "dummy" );
                 if( factory == NULL ){
                     CPPUNIT_ASSERT( false );
                 }
-                
+
                 // Create the transport.
                 transport = factory->createTransport( *properties );
                 if( transport == NULL ){
                     CPPUNIT_ASSERT( false );
                 }
-                
-                transport::DummyTransport* dTransport = 
+
+                transport::DummyTransport* dTransport =
                     dynamic_cast< transport::DummyTransport*>( transport );
-                    
+
                 CPPUNIT_ASSERT( dTransport != NULL );
-                
+
                 dTransport->setCommandListener( &cmdListener );
 
-                connector::stomp::StompConnector* connector = 
-                    new connector::stomp::StompConnector( 
+                connector::stomp::StompConnector* connector =
+                    new connector::stomp::StompConnector(
                         transport, *properties );
 
-                connector->start();                
-                
-                ActiveMQConnection connection( 
+                connector->start();
+
+                ActiveMQConnection connection(
                     new ActiveMQConnectionData(
                         connector, transport, properties) );
 
@@ -176,52 +176,52 @@
                 connection.setExceptionListener( &exListener );
                 CPPUNIT_ASSERT( exListener.caughtOne == false );
                 dTransport->fireException( exceptions::ActiveMQException( __FILE__, __LINE__,
"test" ) );
-                CPPUNIT_ASSERT( exListener.caughtOne == true );                         
      
-                        
+                CPPUNIT_ASSERT( exListener.caughtOne == true );
+
                 cms::Session* session1 = connection.createSession();
                 cms::Session* session2 = connection.createSession();
                 cms::Session* session3 = connection.createSession();
-                
+
                 CPPUNIT_ASSERT( session1 != NULL );
                 CPPUNIT_ASSERT( session2 != NULL );
                 CPPUNIT_ASSERT( session3 != NULL );
-                
+
                 connector::stomp::StompSessionInfo session;
                 connector::stomp::StompConsumerInfo consumer;
-                
+
                 session.setSessionId( 1 );
                 session.setConnectionId( "TEST:123" );
                 session.setAckMode( cms::Session::AUTO_ACKNOWLEDGE );
-                
+
+                connector::stomp::StompTopic myTopic( "test" );
                 consumer.setConsumerId( 1 );
                 consumer.setSessionInfo( &session );
-                consumer.setDestination( 
-                    connector::stomp::StompTopic( "test" ) );
-                    
+                consumer.setDestination( &myTopic );
+
                 connection.addMessageListener( 1, &msgListener );
 
-                connector::stomp::commands::TextMessageCommand* cmd = 
+                connector::stomp::commands::TextMessageCommand* cmd =
                     new connector::stomp::commands::TextMessageCommand;
                 connector::stomp::StompTopic topic1( "test" );
                 cmd->setCMSDestination( &topic1 );
-                
-                connector::ConsumerMessageListener* consumerListener = 
-                    dynamic_cast< connector::ConsumerMessageListener* >( 
+
+                connector::ConsumerMessageListener* consumerListener =
+                    dynamic_cast< connector::ConsumerMessageListener* >(
                         &connection );
 
                 connection.start();
 
                 CPPUNIT_ASSERT( consumerListener != NULL );
-                
+
                 consumerListener->onConsumerMessage( &consumer, cmd );
 
                 CPPUNIT_ASSERT( msgListener.messages.size() == 1 );
 
                 connection.removeMessageListener( 1 );
-                
+
                 msgListener.messages.clear();
                 consumerListener->onConsumerMessage( &consumer, cmd );
-                
+
                 CPPUNIT_ASSERT( msgListener.messages.size() == 0 );
 
                 connection.addMessageListener( 1, &msgListener );
@@ -239,7 +239,7 @@
                 consumerListener->onConsumerMessage( &consumer, cmd );
                 CPPUNIT_ASSERT( msgListener.messages.size() == 1 );
 
-                connection.removeMessageListener( 1 );                
+                connection.removeMessageListener( 1 );
                 msgListener.messages.clear();
 
                 session1->close();
@@ -252,16 +252,16 @@
                 CPPUNIT_ASSERT( exListener.caughtOne == true );
 
                 delete cmd;
-                
+
                 delete session1;
                 delete session2;
                 delete session3;
-                
+
             }
             catch(...)
             {
                 bool exceptionThrown = false;
-                
+
                 CPPUNIT_ASSERT( exceptionThrown );
             }
         }



Mime
View raw message