activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r500794 - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test: Makefile.am activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp activemq/connector/openwire/commands/ActiveMQDestinationTest2.h
Date Sun, 28 Jan 2007 13:47:48 GMT
Author: tabish
Date: Sun Jan 28 05:47:47 2007
New Revision: 500794

URL: http://svn.apache.org/viewvc?view=rev&rev=500794
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Added:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp
  (with props)
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.h
  (with props)
Modified:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?view=diff&rev=500794&r1=500793&r2=500794
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Sun Jan 28 05:47:47
2007
@@ -46,6 +46,7 @@
   activemq/connector/openwire/utils/HexTableTest.cpp \
   activemq/connector/openwire/utils/BooleanStreamTest.cpp \
   activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp \
+  activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp \
   activemq/core/ActiveMQConnectionFactoryTest.cpp \
   activemq/core/ActiveMQConnectionTest.cpp \
   activemq/core/ActiveMQDestinationTest.cpp \

Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp?view=auto&rev=500794
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp
(added)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp
Sun Jan 28 05:47:47 2007
@@ -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.
+ */
+
+#include "ActiveMQDestinationTest2.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQDestinationTest
);
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::commands;
+
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQDestinationTest::test()
+{
+    MyDestination dest;
+
+    dest.setPhysicalName( "test" );
+    dest.setAdvisory( true );
+    dest.setExclusive( true );
+    dest.setOrdered( true );
+
+    CPPUNIT_ASSERT( dest.getPhysicalName().find( "test" ) != string::npos );
+    CPPUNIT_ASSERT( dest.isAdvisory() == true );
+    CPPUNIT_ASSERT( dest.isExclusive() == true );
+    CPPUNIT_ASSERT( dest.isAdvisory() == true );
+    CPPUNIT_ASSERT( dest.isConsumerAdvisory() == false );
+
+}

Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.h?view=auto&rev=500794
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.h
(added)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.h
Sun Jan 28 05:47:47 2007
@@ -0,0 +1,80 @@
+/*
+ * 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_CONNECTOR_OPENWIRE_COMMANDS_ACTIVEMQDESTINATIONTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_ACTIVEMQDESTINATIONTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <activemq/connector/openwire/commands/ActiveMQDestination.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace commands{
+
+    class ActiveMQDestinationTest : public CppUnit::TestFixture {
+        
+        CPPUNIT_TEST_SUITE( ActiveMQDestinationTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST_SUITE_END();
+
+        class MyDestination : public ActiveMQDestination {    
+        public:
+        
+            /**
+             * Returns the Type of Destination that this object represents
+             * @returns int type qualifier.
+             */
+            virtual cms::Destination::DestinationType getDestinationType() const {
+                return cms::Destination::TOPIC;
+            }
+
+            /**
+             * Clone this object and return a new instance that the
+             * caller now owns, this will be an exact copy of this one
+             * @returns new copy of this object.
+             */
+            virtual DataStructure* cloneDataStructure() const { 
+                MyDestination* message = new MyDestination();
+                message->copyDataStructure( this );            
+                return message;
+            }
+
+            /**
+             * Copy the contents of the passed object into this objects
+             * members, overwriting any existing data.
+             * @return src - Source Object
+             */
+            virtual void copyDataStructure( const DataStructure* src ) {
+                ActiveMQDestination::copyDataStructure( src );
+            }
+        };
+        
+    public:
+    
+    	ActiveMQDestinationTest() {}
+    	virtual ~ActiveMQDestinationTest() {}
+        
+        virtual void test();
+
+    };
+
+}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_ACTIVEMQDESTINATIONTEST_H_*/

Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message