activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r957961 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration: ./ activemq/test/ activemq/test/openwire/
Date Fri, 25 Jun 2010 14:13:33 GMT
Author: tabish
Date: Fri Jun 25 14:13:32 2010
New Revision: 957961

URL: http://svn.apache.org/viewvc?rev=957961&view=rev
Log:
Adds an integration test case for MapMessage use cases.

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h
  (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am?rev=957961&r1=957960&r2=957961&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am Fri Jun 25 14:13:32
2010
@@ -22,6 +22,7 @@ cc_sources = \
     activemq/test/DurableTest.cpp \
     activemq/test/ExpirationTest.cpp \
     activemq/test/JmsMessageGroupsTest.cpp \
+    activemq/test/MapMessageTest.cpp \
     activemq/test/MessageCompressionTest.cpp \
     activemq/test/QueueBrowserTest.cpp \
     activemq/test/SimpleRollbackTest.cpp \
@@ -36,6 +37,7 @@ cc_sources = \
     activemq/test/openwire/OpenwireExpirationTest.cpp \
     activemq/test/openwire/OpenwireIndividualAckTest.cpp \
     activemq/test/openwire/OpenwireJmsMessageGroupsTest.cpp \
+    activemq/test/openwire/OpenwireMapMessageTest.cpp \
     activemq/test/openwire/OpenwireMessageCompressionTest.cpp \
     activemq/test/openwire/OpenwireQueueBrowserTest.cpp \
     activemq/test/openwire/OpenwireSimpleRollbackTest.cpp \
@@ -67,6 +69,7 @@ h_sources = \
     activemq/test/DurableTest.h \
     activemq/test/ExpirationTest.h \
     activemq/test/JmsMessageGroupsTest.h \
+    activemq/test/MapMessageTest.h \
     activemq/test/MessageCompressionTest.h \
     activemq/test/QueueBrowserTest.h \
     activemq/test/SimpleRollbackTest.h \
@@ -81,6 +84,7 @@ h_sources = \
     activemq/test/openwire/OpenwireExpirationTest.h \
     activemq/test/openwire/OpenwireIndividualAckTest.h \
     activemq/test/openwire/OpenwireJmsMessageGroupsTest.h \
+    activemq/test/openwire/OpenwireMapMessageTest.h \
     activemq/test/openwire/OpenwireMessageCompressionTest.h \
     activemq/test/openwire/OpenwireQueueBrowserTest.h \
     activemq/test/openwire/OpenwireSimpleRollbackTest.h \

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp?rev=957961&r1=957960&r2=957961&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp Fri Jun
25 14:13:32 2010
@@ -22,6 +22,7 @@
 #include "activemq/test/openwire/OpenwireExpirationTest.h"
 #include "activemq/test/openwire/OpenwireIndividualAckTest.h"
 #include "activemq/test/openwire/OpenwireMessageCompressionTest.h"
+#include "activemq/test/openwire/OpenwireMapMessageTest.h"
 #include "activemq/test/openwire/OpenwireQueueBrowserTest.h"
 #include "activemq/test/openwire/OpenwireSimpleRollbackTest.h"
 #include "activemq/test/openwire/OpenwireSimpleTest.h"
@@ -49,6 +50,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( activem
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireExpirationTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireIndividualAckTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMessageCompressionTest
);
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMapMessageTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireQueueBrowserTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireSimpleRollbackTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireSimpleTest );

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp?rev=957961&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
Fri Jun 25 14:13:32 2010
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "MapMessageTest.h"
+
+#include <activemq/util/CMSListener.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/core/ActiveMQConnection.h>
+#include <activemq/commands/ActiveMQMapMessage.h>
+
+using namespace std;
+using namespace cms;
+using namespace activemq;
+using namespace activemq::commands;
+using namespace activemq::core;
+using namespace activemq::test;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace decaf;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+////////////////////////////////////////////////////////////////////////////////
+MapMessageTest::MapMessageTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+MapMessageTest::~MapMessageTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MapMessageTest::testEmptyMapSendReceive() {
+
+    // Create CMS Object for Comms
+    cms::Session* session( cmsProvider->getSession() );
+    cms::MessageConsumer* consumer = cmsProvider->getConsumer();
+    cms::MessageProducer* producer = cmsProvider->getProducer();
+    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+
+    auto_ptr<cms::MapMessage> mapMessage( session->createMapMessage() );
+
+    // Send some text messages
+    producer->send( mapMessage.get() );
+
+    auto_ptr<cms::Message> message( consumer->receive( 2000 ) );
+    CPPUNIT_ASSERT( message.get() != NULL );
+
+    cms::MapMessage* recvMapMessage = dynamic_cast<MapMessage*>( message.get() );
+    CPPUNIT_ASSERT( recvMapMessage != NULL );
+    CPPUNIT_ASSERT( recvMapMessage->itemExists( "SomeKey" ) == false );
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h?rev=957961&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h
Fri Jun 25 14:13:32 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_TEST_MAPMESSAGETEST_H_
+#define _ACTIVEMQ_TEST_MAPMESSAGETEST_H_
+
+#include <activemq/test/CMSTestFixture.h>
+#include <activemq/util/IntegrationCommon.h>
+
+namespace activemq {
+namespace test {
+
+    class MapMessageTest : public CMSTestFixture {
+    public:
+
+        MapMessageTest();
+        virtual ~MapMessageTest();
+
+        void testEmptyMapSendReceive();
+
+    };
+
+}}
+
+#endif /* _ACTIVEMQ_TEST_MAPMESSAGETEST_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp?rev=957961&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp
Fri Jun 25 14:13:32 2010
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "OpenwireMapMessageTest.h"
+
+using namespace activemq;
+using namespace activemq::test;
+using namespace activemq::test::openwire;
+
+////////////////////////////////////////////////////////////////////////////////
+OpenwireMapMessageTest::OpenwireMapMessageTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+OpenwireMapMessageTest::~OpenwireMapMessageTest() {
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h?rev=957961&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h
Fri Jun 25 14:13:32 2010
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_TEST_OPENWIRE_OPENWIREMAPMESSAGETEST_H_
+#define _ACTIVEMQ_TEST_OPENWIRE_OPENWIREMAPMESSAGETEST_H_
+
+#include <activemq/test/MapMessageTest.h>
+
+namespace activemq {
+namespace test {
+namespace openwire {
+
+    class OpenwireMapMessageTest : public MapMessageTest {
+    private:
+
+        CPPUNIT_TEST_SUITE( OpenwireMapMessageTest );
+        CPPUNIT_TEST( testEmptyMapSendReceive );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        OpenwireMapMessageTest();
+        virtual ~OpenwireMapMessageTest();
+
+        virtual std::string getBrokerURL() const {
+            return activemq::util::IntegrationCommon::getInstance().getOpenwireURL();
+        }
+    };
+
+}}}
+
+#endif /* _ACTIVEMQ_TEST_OPENWIRE_OPENWIREMAPMESSAGETEST_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message