You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2006/10/18 21:56:52 UTC
svn commit: r465352 - in
/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src:
main/activemq/connector/stomp/ main/activemq/connector/stomp/commands/
main/activemq/exceptions/ main/cms/ test/activemq/connector/stomp/
test/activemq/connector/stomp/co...
Author: tabish
Date: Wed Oct 18 12:56:50 2006
New Revision: 465352
URL: http://svn.apache.org/viewvc?view=rev&rev=465352
Log:
Code cleanup for upcoming release
Modified:
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ErrorCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ReceiptCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/SubscribeCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/TextMessageCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/UnsubscribeCommand.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ActiveMQException.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/CMSException.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryQueue.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryTopic.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TextMessage.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompCommandReaderTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AbortCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AckCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BeginCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/CommitCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ErrorCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/exceptions/ActiveMQExceptionTest.h
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/network/SocketTest.h
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp Wed Oct 18 12:56:50 2006
@@ -501,7 +501,7 @@
{
AckCommand cmd;
- if( message->getCMSMessageId() == NULL )
+ if( message->getCMSMessageId() == "" )
{
throw StompConnectorException(
__FILE__, __LINE__,
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h Wed Oct 18 12:56:50 2006
@@ -198,12 +198,12 @@
* Get the Transaction Id of this Command
* @return the Id of the Transaction
*/
- virtual const char* getTransactionId(void) const{
+ virtual std::string getTransactionId(void) const{
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_TRANSACTIONID) );
+ CommandConstants::HEADER_TRANSACTIONID ), "" );
}
-
+
/**
* Set the Transaction Id of this Command
* @param id the Id of the Transaction
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ErrorCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ErrorCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ErrorCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ErrorCommand.h Wed Oct 18 12:56:50 2006
@@ -49,10 +49,10 @@
* Get the error message
* @return the error message string
*/
- virtual const char* getErrorMessage(void) const {
+ virtual std::string getErrorMessage(void) const {
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_MESSAGE) );
+ CommandConstants::HEADER_MESSAGE ), "" );
}
/**
@@ -78,8 +78,8 @@
* Get the Text associated with this Error
* @return Error Message String
*/
- virtual const char* getErrorDetails(void) const {
- return getBytes();
+ virtual std::string getErrorDetails(void) const {
+ return getBytes() != NULL ? getBytes() : "";
}
protected:
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ReceiptCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ReceiptCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ReceiptCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/ReceiptCommand.h Wed Oct 18 12:56:50 2006
@@ -49,10 +49,10 @@
* Get the receipt id
* @returns the message id
*/
- virtual const char* getReceiptId(void) const{
+ virtual std::string getReceiptId(void) const{
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_RECEIPTID) );
+ CommandConstants::HEADER_RECEIPTID ), "" );
}
/**
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompCommand.h Wed Oct 18 12:56:50 2006
@@ -90,7 +90,7 @@
* Get the Transaction Id of this Command
* @return the Id of the Transaction
*/
- virtual const char* getTransactionId(void) const = 0;
+ virtual std::string getTransactionId(void) const = 0;
/**
* Set the Transaction Id of this Command
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h Wed Oct 18 12:56:50 2006
@@ -90,10 +90,10 @@
* Get the Correlation Id for this message
* @return string representation of the correlation Id
*/
- virtual const char* getCMSCorrelationId(void) const {
+ virtual std::string getCMSCorrelationId(void) const {
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_CORRELATIONID ) );
+ CommandConstants::HEADER_CORRELATIONID ), "" );
}
/**
@@ -191,12 +191,12 @@
* Gets the CMS Message Id for this Message
* @return time value
*/
- virtual const char* getCMSMessageId(void) const {
+ virtual std::string getCMSMessageId(void) const {
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_MESSAGEID ) );
+ CommandConstants::HEADER_MESSAGEID ), "" );
}
-
+
/**
* Sets the CMS Message Id for this message
* @param id time value
@@ -255,10 +255,10 @@
* Gets the CMS Reply To Address for this Message
* @return Reply To Value
*/
- virtual const char* getCMSReplyTo(void) const {
+ virtual std::string getCMSReplyTo(void) const {
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_REPLYTO ) );
+ CommandConstants::HEADER_REPLYTO ), "" );
}
/**
@@ -297,10 +297,10 @@
* Gets the CMS Message Type for this Message
* @return type value
*/
- virtual const char* getCMSMessageType(void) const {
+ virtual std::string getCMSMessageType(void) const {
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_TYPE ) );
+ CommandConstants::HEADER_TYPE ), "" );
}
/**
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/SubscribeCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/SubscribeCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/SubscribeCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/SubscribeCommand.h Wed Oct 18 12:56:50 2006
@@ -50,10 +50,10 @@
* Get the destination
* @returns the destination Name String
*/
- virtual const char* getDestination(void) const{
+ virtual std::string getDestination(void) const{
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_DESTINATION ) );
+ CommandConstants::HEADER_DESTINATION ), "" );
}
/**
@@ -106,10 +106,10 @@
* subscribe request
* @returns the selector string
*/
- virtual const char* getMessageSelector(void) const{
+ virtual std::string getMessageSelector(void) const{
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_SELECTOR ) );
+ CommandConstants::HEADER_SELECTOR ), "" );
}
/**
@@ -129,10 +129,10 @@
* subscribe request
* @returns the Subscription Name
*/
- virtual const char* getSubscriptionName(void) const{
+ virtual std::string getSubscriptionName(void) const{
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_SUBSCRIPTIONNAME ) );
+ CommandConstants::HEADER_SUBSCRIPTIONNAME ), "" );
}
/**
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/TextMessageCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/TextMessageCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/TextMessageCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/TextMessageCommand.h Wed Oct 18 12:56:50 2006
@@ -57,8 +57,8 @@
* Gets the message character buffer.
* @return The message character buffer.
*/
- virtual const char* getText(void) const throw( cms::CMSException ) {
- return getBytes();
+ virtual std::string getText(void) const throw( cms::CMSException ) {
+ return getBytes() != NULL ? getBytes() : "";
}
/**
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/UnsubscribeCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/UnsubscribeCommand.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/UnsubscribeCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/UnsubscribeCommand.h Wed Oct 18 12:56:50 2006
@@ -49,10 +49,10 @@
* Get the destination
* @returns the Destination as a string
*/
- virtual const char* getDestination(void) const{
+ virtual std::string getDestination(void) const{
return getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_DESTINATION ) );
+ CommandConstants::HEADER_DESTINATION ), "" );
}
/**
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ActiveMQException.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ActiveMQException.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ActiveMQException.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ActiveMQException.h Wed Oct 18 12:56:50 2006
@@ -82,7 +82,9 @@
* Gets the message for this exception.
* @return Text formatted error message
*/
- virtual const char* getMessage() const{ return message.c_str(); }
+ virtual std::string getMessage() const{
+ return message;
+ }
/**
* Sets the cause for this exception.
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/CMSException.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/CMSException.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/CMSException.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/CMSException.h Wed Oct 18 12:56:50 2006
@@ -39,7 +39,7 @@
* Gets the cause of the error.
* @return string errors message
*/
- virtual const char* getMessage() const = 0;
+ virtual std::string getMessage() const = 0;
/**
* Provides the stack trace for every point where
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h Wed Oct 18 12:56:50 2006
@@ -60,7 +60,7 @@
* Get the Correlation Id for this message
* @return string representation of the correlation Id
*/
- virtual const char* getCMSCorrelationId(void) const = 0;
+ virtual std::string getCMSCorrelationId(void) const = 0;
/**
* Sets the Correlation Id used by this message
@@ -108,7 +108,7 @@
* Gets the CMS Message Id for this Message
* @return time value
*/
- virtual const char* getCMSMessageId(void) const = 0;
+ virtual std::string getCMSMessageId(void) const = 0;
/**
* Sets the CMS Message Id for this message
@@ -144,7 +144,7 @@
* Gets the CMS Reply To Address for this Message
* @return Reply To Value
*/
- virtual const char* getCMSReplyTo(void) const = 0;
+ virtual std::string getCMSReplyTo(void) const = 0;
/**
* Sets the CMS Reply To Address for this message
@@ -168,7 +168,7 @@
* Gets the CMS Message Type for this Message
* @return type value
*/
- virtual const char* getCMSMessageType(void) const = 0;
+ virtual std::string getCMSMessageType(void) const = 0;
/**
* Sets the CMS Message Type for this message
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryQueue.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryQueue.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryQueue.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryQueue.h Wed Oct 18 12:56:50 2006
@@ -36,7 +36,7 @@
* Gets the name of this queue.
* @return The queue name.
*/
- virtual const char* getQueueName(void) const
+ virtual std::string getQueueName(void) const
throw( CMSException ) = 0;
};
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryTopic.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryTopic.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryTopic.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TemporaryTopic.h Wed Oct 18 12:56:50 2006
@@ -36,7 +36,7 @@
* Gets the name of this topic.
* @return The topic name.
*/
- virtual const char* getTopicName(void)
+ virtual std::string getTopicName(void)
const throw( CMSException ) = 0;
};
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TextMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TextMessage.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TextMessage.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/TextMessage.h Wed Oct 18 12:56:50 2006
@@ -36,7 +36,7 @@
* Gets the message character buffer.
* @return The message character buffer.
*/
- virtual const char* getText() const throw( CMSException ) = 0;
+ virtual std::string getText() const throw( CMSException ) = 0;
/**
* Sets the message contents, does not take ownership of the passed
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompCommandReaderTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompCommandReaderTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompCommandReaderTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompCommandReaderTest.h Wed Oct 18 12:56:50 2006
@@ -96,7 +96,7 @@
CPPUNIT_ASSERT( textMessage != NULL );
- CPPUNIT_ASSERT( textMessage->getText() != NULL );
+ CPPUNIT_ASSERT( textMessage->getText() != "" );
std::string text = textMessage->getText();
CPPUNIT_ASSERT( text == "testMessage" );
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AbortCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AbortCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AbortCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AbortCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -68,7 +68,7 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AckCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AckCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AckCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/AckCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -71,8 +71,8 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getMessageId()) == cmd1.getMessageId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getMessageId() == cmd1.getMessageId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
};
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BeginCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BeginCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BeginCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BeginCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -68,7 +68,7 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h Wed Oct 18 12:56:50 2006
@@ -77,7 +77,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -110,7 +110,7 @@
CPPUNIT_ASSERT(
std::string( cmd.getProperties().getProperty( "test" ) ) == "value" );
- CPPUNIT_ASSERT( cmd.getCMSCorrelationId() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSCorrelationId() == "" );
cmd.setCMSCorrelationId( "ID:1234567" );
CPPUNIT_ASSERT( std::string( cmd.getCMSCorrelationId() ) ==
"ID:1234567" );
@@ -125,7 +125,7 @@
CPPUNIT_ASSERT( cmd.getCMSExpiration() == 0 );
cmd.setCMSExpiration( 123 );
CPPUNIT_ASSERT( cmd.getCMSExpiration() == 123 );
- CPPUNIT_ASSERT( cmd.getCMSMessageId() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSMessageId() == "" );
cmd.setCMSMessageId( "ID:1234567" );
CPPUNIT_ASSERT( std::string( cmd.getCMSMessageId() ) ==
"ID:1234567" );
@@ -135,14 +135,14 @@
CPPUNIT_ASSERT( cmd.getCMSRedelivered() == false );
cmd.setCMSRedelivered( true );
CPPUNIT_ASSERT( cmd.getCMSRedelivered() == true );
- CPPUNIT_ASSERT( cmd.getCMSReplyTo() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSReplyTo() == "" );
cmd.setCMSReplyTo( "topic" );
CPPUNIT_ASSERT( std::string( cmd.getCMSReplyTo() ) ==
"topic" );
CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 0 );
cmd.setCMSTimeStamp( 123 );
CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 123 );
- CPPUNIT_ASSERT( cmd.getCMSMessageType() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSMessageType() == "" );
cmd.setCMSMessageType( "test" );
CPPUNIT_ASSERT( std::string( cmd.getCMSMessageType() ) ==
"test" );
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/CommitCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/CommitCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/CommitCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/CommitCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -68,7 +68,7 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -68,7 +68,7 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -68,7 +68,7 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,7 +53,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -68,7 +68,7 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ErrorCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ErrorCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ErrorCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ErrorCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,14 +53,14 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
- CPPUNIT_ASSERT( cmd.getErrorMessage() == NULL );
+ CPPUNIT_ASSERT( cmd.getErrorMessage() == "" );
cmd.setErrorMessage( "Error" );
CPPUNIT_ASSERT( std::string( cmd.getErrorMessage() ) == "Error" );
- CPPUNIT_ASSERT( cmd.getErrorDetails() == NULL );
+ CPPUNIT_ASSERT( cmd.getErrorDetails() == "" );
cmd.setErrorDetails( "ErrorD" );
CPPUNIT_ASSERT( std::string( cmd.getErrorDetails() ) == "ErrorD" );
@@ -74,9 +74,9 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) == cmd1.getTransactionId() );
- CPPUNIT_ASSERT( std::string(cmd.getErrorMessage()) == cmd1.getErrorMessage() );
- CPPUNIT_ASSERT( std::string(cmd.getErrorDetails()) == cmd1.getErrorDetails() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getErrorMessage() == cmd1.getErrorMessage() );
+ CPPUNIT_ASSERT( cmd.getErrorDetails() == cmd1.getErrorDetails() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h Wed Oct 18 12:56:50 2006
@@ -78,7 +78,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -110,7 +110,7 @@
std::string( cmd.getProperties().getProperty( "test" ) ) ==
"value" );
- CPPUNIT_ASSERT( cmd.getCMSCorrelationId() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSCorrelationId() == "" );
cmd.setCMSCorrelationId( "ID:1234567" );
CPPUNIT_ASSERT( std::string( cmd.getCMSCorrelationId() ) ==
"ID:1234567" );
@@ -124,7 +124,7 @@
CPPUNIT_ASSERT( cmd.getCMSExpiration() == 0 );
cmd.setCMSExpiration( 123 );
CPPUNIT_ASSERT( cmd.getCMSExpiration() == 123 );
- CPPUNIT_ASSERT( cmd.getCMSMessageId() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSMessageId() == "" );
cmd.setCMSMessageId( "ID:1234567" );
CPPUNIT_ASSERT( std::string( cmd.getCMSMessageId() ) ==
"ID:1234567" );
@@ -134,14 +134,14 @@
CPPUNIT_ASSERT( cmd.getCMSRedelivered() == false );
cmd.setCMSRedelivered( true );
CPPUNIT_ASSERT( cmd.getCMSRedelivered() == true );
- CPPUNIT_ASSERT( cmd.getCMSReplyTo() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSReplyTo() == "" );
cmd.setCMSReplyTo( "topic" );
CPPUNIT_ASSERT( std::string( cmd.getCMSReplyTo() ) ==
"topic" );
CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 0 );
cmd.setCMSTimeStamp( 123 );
CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 123 );
- CPPUNIT_ASSERT( cmd.getCMSMessageType() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSMessageType() == "" );
cmd.setCMSMessageType( "test" );
CPPUNIT_ASSERT( std::string( cmd.getCMSMessageType() ) ==
"test" );
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,11 +53,11 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
- CPPUNIT_ASSERT( cmd.getReceiptId() == NULL );
+ CPPUNIT_ASSERT( cmd.getReceiptId() == "" );
cmd.setReceiptId( "456987" );
CPPUNIT_ASSERT( std::string( cmd.getReceiptId() ) ==
"456987" );
@@ -72,10 +72,8 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
- cmd1.getTransactionId() );
- CPPUNIT_ASSERT( std::string( cmd.getReceiptId() ) ==
- cmd1.getReceiptId() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getReceiptId() == cmd1.getReceiptId() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.h Wed Oct 18 12:56:50 2006
@@ -53,11 +53,11 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
- CPPUNIT_ASSERT( cmd.getDestination() == NULL );
+ CPPUNIT_ASSERT( cmd.getDestination() == "" );
cmd.setDestination( "456987" );
CPPUNIT_ASSERT( std::string( cmd.getDestination() ) ==
"456987" );
@@ -66,11 +66,11 @@
cmd.setAckMode( CommandConstants::ACK_CLIENT );
CPPUNIT_ASSERT( cmd.getAckMode() ==
CommandConstants::ACK_CLIENT );
- CPPUNIT_ASSERT( cmd.getMessageSelector() == NULL );
+ CPPUNIT_ASSERT( cmd.getMessageSelector() == "" );
cmd.setMessageSelector( "Selector" );
CPPUNIT_ASSERT( std::string( cmd.getMessageSelector() ) ==
"Selector" );
- CPPUNIT_ASSERT( cmd.getSubscriptionName() == NULL );
+ CPPUNIT_ASSERT( cmd.getSubscriptionName() == "" );
cmd.setSubscriptionName( "subscription" );
CPPUNIT_ASSERT( std::string( cmd.getSubscriptionName() ) ==
"subscription" );
@@ -88,15 +88,11 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string(cmd.getTransactionId()) ==
- cmd1.getTransactionId() );
- CPPUNIT_ASSERT( std::string( cmd.getDestination() ) ==
- cmd1.getDestination() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getDestination() == cmd1.getDestination() );
CPPUNIT_ASSERT( cmd.getAckMode() == cmd1.getAckMode() );
- CPPUNIT_ASSERT( std::string( cmd.getMessageSelector() ) ==
- cmd1.getMessageSelector() );
- CPPUNIT_ASSERT( std::string( cmd.getSubscriptionName() ) ==
- cmd1.getSubscriptionName() );
+ CPPUNIT_ASSERT( cmd.getMessageSelector() == cmd1.getMessageSelector() );
+ CPPUNIT_ASSERT( cmd.getSubscriptionName() == cmd1.getSubscriptionName() );
CPPUNIT_ASSERT( cmd.getNoLocal() == cmd1.getNoLocal() );
}
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h Wed Oct 18 12:56:50 2006
@@ -77,7 +77,7 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
@@ -109,7 +109,7 @@
std::string( cmd.getProperties().getProperty( "test" ) ) ==
"value" );
- CPPUNIT_ASSERT( cmd.getCMSCorrelationId() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSCorrelationId() == "" );
cmd.setCMSCorrelationId( "ID:1234567" );
CPPUNIT_ASSERT( std::string( cmd.getCMSCorrelationId() ) ==
"ID:1234567" );
@@ -123,7 +123,7 @@
CPPUNIT_ASSERT( cmd.getCMSExpiration() == 0 );
cmd.setCMSExpiration( 123 );
CPPUNIT_ASSERT( cmd.getCMSExpiration() == 123 );
- CPPUNIT_ASSERT( cmd.getCMSMessageId() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSMessageId() == "" );
cmd.setCMSMessageId( "ID:1234567" );
CPPUNIT_ASSERT( std::string( cmd.getCMSMessageId() ) ==
"ID:1234567" );
@@ -133,14 +133,14 @@
CPPUNIT_ASSERT( cmd.getCMSRedelivered() == false );
cmd.setCMSRedelivered( true );
CPPUNIT_ASSERT( cmd.getCMSRedelivered() == true );
- CPPUNIT_ASSERT( cmd.getCMSReplyTo() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSReplyTo() == "" );
cmd.setCMSReplyTo( "topic" );
CPPUNIT_ASSERT( std::string( cmd.getCMSReplyTo() ) ==
"topic" );
CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 0 );
cmd.setCMSTimeStamp( 123 );
CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 123 );
- CPPUNIT_ASSERT( cmd.getCMSMessageType() == NULL );
+ CPPUNIT_ASSERT( cmd.getCMSMessageType() == "" );
cmd.setCMSMessageType( "text" );
CPPUNIT_ASSERT( std::string( cmd.getCMSMessageType() ) ==
"text" );
@@ -148,7 +148,7 @@
cmd.setRedeliveryCount( 123 );
CPPUNIT_ASSERT( cmd.getRedeliveryCount() == 123 );
- CPPUNIT_ASSERT( cmd.getText() == NULL );
+ CPPUNIT_ASSERT( cmd.getText() == "" );
cmd.setText( "TESTMESSAGE" );
CPPUNIT_ASSERT( std::string( cmd.getText() ) == "TESTMESSAGE" );
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.h Wed Oct 18 12:56:50 2006
@@ -52,11 +52,11 @@
CPPUNIT_ASSERT( cmd.getCommandId() == 123 );
cmd.setCorrelationId( 99 );
CPPUNIT_ASSERT( cmd.getCorrelationId() == 99 );
- CPPUNIT_ASSERT( cmd.getTransactionId() == NULL );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == "" );
cmd.setTransactionId( "ID:123456" );
CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
"ID:123456" );
- CPPUNIT_ASSERT( cmd.getDestination() == NULL );
+ CPPUNIT_ASSERT( cmd.getDestination() == "" );
cmd.setDestination( "456987" );
CPPUNIT_ASSERT( std::string( cmd.getDestination() ) ==
"456987" );
@@ -71,10 +71,8 @@
CPPUNIT_ASSERT( cmd.getStompCommandId() == cmd1.getStompCommandId() );
CPPUNIT_ASSERT( cmd.isResponseRequired() == cmd1.isResponseRequired() );
CPPUNIT_ASSERT( cmd.getCorrelationId() == cmd1.getCorrelationId() );
- CPPUNIT_ASSERT( std::string( cmd.getTransactionId() ) ==
- cmd1.getTransactionId() );
- CPPUNIT_ASSERT( std::string( cmd.getDestination() ) ==
- cmd1.getDestination() );
+ CPPUNIT_ASSERT( cmd.getTransactionId() == cmd1.getTransactionId() );
+ CPPUNIT_ASSERT( cmd.getDestination() == cmd1.getDestination() );
}
};
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/exceptions/ActiveMQExceptionTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/exceptions/ActiveMQExceptionTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/exceptions/ActiveMQExceptionTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/exceptions/ActiveMQExceptionTest.h Wed Oct 18 12:56:50 2006
@@ -41,13 +41,13 @@
void testMessage0(){
char* text = "This is a test";
ActiveMQException ex( __FILE__, __LINE__, text );
- CPPUNIT_ASSERT( strcmp( ex.getMessage(), text ) == 0 );
+ CPPUNIT_ASSERT( strcmp( ex.getMessage().c_str(), text ) == 0 );
}
void testMessage3(){
ActiveMQException ex( __FILE__, __LINE__,
"This is a test %d %d %d", 1, 100, 1000 );
- CPPUNIT_ASSERT( strcmp( ex.getMessage(), "This is a test 1 100 1000" ) == 0 );
+ CPPUNIT_ASSERT( strcmp( ex.getMessage().c_str(), "This is a test 1 100 1000" ) == 0 );
}
};
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/network/SocketTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/network/SocketTest.h?view=diff&rev=465352&r1=465351&r2=465352
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/network/SocketTest.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/network/SocketTest.h Wed Oct 18 12:56:50 2006
@@ -138,7 +138,7 @@
}
}catch( io::IOException& ex ){
- printf("%s\n", ex.getMessage() );
+ printf("%s\n", ex.getMessage().c_str() );
CPPUNIT_ASSERT( false );
}catch( ... ){
CPPUNIT_ASSERT( false );
@@ -193,8 +193,7 @@
serverThread.join();
}catch( io::IOException& ex ){
- const char* error = ex.getMessage();
- printf( "%s\n", error );
+ printf( "%s\n", ex.getMessage().c_str() );
}
}
@@ -248,8 +247,7 @@
serverThread.join();
}catch( io::IOException& ex ){
- const char* error = ex.getMessage();
- printf( "%s\n", error );
+ printf( "%s\n", ex.getMessage().c_str() );
}
}
@@ -301,8 +299,7 @@
serverThread.join();
}catch( io::IOException& ex ){
- const char* error = ex.getMessage();
- printf( "%s\n", error );
+ printf( "%s\n", ex.getMessage().c_str() );
}
}