Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 4369 invoked from network); 28 Jan 2007 13:48:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jan 2007 13:48:09 -0000 Received: (qmail 88275 invoked by uid 500); 28 Jan 2007 13:48:15 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 88254 invoked by uid 500); 28 Jan 2007 13:48:15 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 88243 invoked by uid 99); 28 Jan 2007 13:48:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Jan 2007 05:48:15 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Jan 2007 05:48:08 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 68DB41A981C; Sun, 28 Jan 2007 05:47:48 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: activemq-commits@geronimo.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070128134748.68DB41A981C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 +#include + +#include + +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