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 2009/07/24 22:09:44 UTC
svn commit: r797633 [35/37] - in /activemq/activemq-cpp/trunk/activemq-cpp:
./ src/main/ src/main/activemq/commands/ src/main/activemq/core/
src/main/activemq/wireformat/openwire/
src/main/activemq/wireformat/openwire/marshal/v1/ src/main/activemq/wire...
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshaller.h>
+#include <activemq/commands/MessageDispatchNotification.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::MessageDispatchNotificationMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchNotificationMarshallerTest::test() {
+
+ MessageDispatchNotificationMarshaller myMarshaller;
+ MessageDispatchNotification myCommand;
+ MessageDispatchNotification* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<MessageDispatchNotification*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchNotificationMarshallerTest::testLooseMarshal() {
+
+ MessageDispatchNotificationMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ MessageDispatchNotification outCommand;
+ MessageDispatchNotification inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchNotificationMarshallerTest::testTightMarshal() {
+
+ MessageDispatchNotificationMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ MessageDispatchNotification outCommand;
+ MessageDispatchNotification inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEDISPATCHNOTIFICATIONMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEDISPATCHNOTIFICATIONMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for MessageDispatchNotificationMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class MessageDispatchNotificationMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( MessageDispatchNotificationMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ MessageDispatchNotificationMarshallerTest() {}
+ virtual ~MessageDispatchNotificationMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEDISPATCHNOTIFICATIONMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/MessageIdMarshaller.h>
+#include <activemq/commands/MessageId.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::MessageIdMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageIdMarshallerTest::test() {
+
+ MessageIdMarshaller myMarshaller;
+ MessageId myCommand;
+ MessageId* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<MessageId*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageIdMarshallerTest::testLooseMarshal() {
+
+ MessageIdMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ MessageId outCommand;
+ MessageId inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageIdMarshallerTest::testTightMarshal() {
+
+ MessageIdMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ MessageId outCommand;
+ MessageId inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEIDMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for MessageIdMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class MessageIdMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( MessageIdMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ MessageIdMarshallerTest() {}
+ virtual ~MessageIdMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEIDMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/MessagePullMarshaller.h>
+#include <activemq/commands/MessagePull.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::MessagePullMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void MessagePullMarshallerTest::test() {
+
+ MessagePullMarshaller myMarshaller;
+ MessagePull myCommand;
+ MessagePull* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<MessagePull*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessagePullMarshallerTest::testLooseMarshal() {
+
+ MessagePullMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ MessagePull outCommand;
+ MessagePull inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessagePullMarshallerTest::testTightMarshal() {
+
+ MessagePullMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ MessagePull outCommand;
+ MessagePull inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEPULLMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEPULLMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for MessagePullMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class MessagePullMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( MessagePullMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ MessagePullMarshallerTest() {}
+ virtual ~MessagePullMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_MESSAGEPULLMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshaller.h>
+#include <activemq/commands/NetworkBridgeFilter.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::NetworkBridgeFilterMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void NetworkBridgeFilterMarshallerTest::test() {
+
+ NetworkBridgeFilterMarshaller myMarshaller;
+ NetworkBridgeFilter myCommand;
+ NetworkBridgeFilter* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<NetworkBridgeFilter*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void NetworkBridgeFilterMarshallerTest::testLooseMarshal() {
+
+ NetworkBridgeFilterMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ NetworkBridgeFilter outCommand;
+ NetworkBridgeFilter inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void NetworkBridgeFilterMarshallerTest::testTightMarshal() {
+
+ NetworkBridgeFilterMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ NetworkBridgeFilter outCommand;
+ NetworkBridgeFilter inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_NETWORKBRIDGEFILTERMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_NETWORKBRIDGEFILTERMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for NetworkBridgeFilterMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class NetworkBridgeFilterMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( NetworkBridgeFilterMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ NetworkBridgeFilterMarshallerTest() {}
+ virtual ~NetworkBridgeFilterMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_NETWORKBRIDGEFILTERMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/PartialCommandMarshaller.h>
+#include <activemq/commands/PartialCommand.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::PartialCommandMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void PartialCommandMarshallerTest::test() {
+
+ PartialCommandMarshaller myMarshaller;
+ PartialCommand myCommand;
+ PartialCommand* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<PartialCommand*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void PartialCommandMarshallerTest::testLooseMarshal() {
+
+ PartialCommandMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ PartialCommand outCommand;
+ PartialCommand inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void PartialCommandMarshallerTest::testTightMarshal() {
+
+ PartialCommandMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ PartialCommand outCommand;
+ PartialCommand inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PARTIALCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PARTIALCOMMANDMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for PartialCommandMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class PartialCommandMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( PartialCommandMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ PartialCommandMarshallerTest() {}
+ virtual ~PartialCommandMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PARTIALCOMMANDMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ProducerAckMarshaller.h>
+#include <activemq/commands/ProducerAck.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ProducerAckMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerAckMarshallerTest::test() {
+
+ ProducerAckMarshaller myMarshaller;
+ ProducerAck myCommand;
+ ProducerAck* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<ProducerAck*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerAckMarshallerTest::testLooseMarshal() {
+
+ ProducerAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ ProducerAck outCommand;
+ ProducerAck inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerAckMarshallerTest::testTightMarshal() {
+
+ ProducerAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ ProducerAck outCommand;
+ ProducerAck inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERACKMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for ProducerAckMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class ProducerAckMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ProducerAckMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ ProducerAckMarshallerTest() {}
+ virtual ~ProducerAckMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERACKMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ProducerIdMarshaller.h>
+#include <activemq/commands/ProducerId.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ProducerIdMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerIdMarshallerTest::test() {
+
+ ProducerIdMarshaller myMarshaller;
+ ProducerId myCommand;
+ ProducerId* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<ProducerId*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerIdMarshallerTest::testLooseMarshal() {
+
+ ProducerIdMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ ProducerId outCommand;
+ ProducerId inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerIdMarshallerTest::testTightMarshal() {
+
+ ProducerIdMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ ProducerId outCommand;
+ ProducerId inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERIDMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for ProducerIdMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class ProducerIdMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ProducerIdMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ ProducerIdMarshallerTest() {}
+ virtual ~ProducerIdMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERIDMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshaller.h>
+#include <activemq/commands/ProducerInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ProducerInfoMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerInfoMarshallerTest::test() {
+
+ ProducerInfoMarshaller myMarshaller;
+ ProducerInfo myCommand;
+ ProducerInfo* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<ProducerInfo*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerInfoMarshallerTest::testLooseMarshal() {
+
+ ProducerInfoMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ ProducerInfo outCommand;
+ ProducerInfo inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ProducerInfoMarshallerTest::testTightMarshal() {
+
+ ProducerInfoMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ ProducerInfo outCommand;
+ ProducerInfo inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERINFOMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for ProducerInfoMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class ProducerInfoMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ProducerInfoMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ ProducerInfoMarshallerTest() {}
+ virtual ~ProducerInfoMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_PRODUCERINFOMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * 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 <activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshaller.h>
+#include <activemq/commands/RemoveInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::RemoveInfoMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void RemoveInfoMarshallerTest::test() {
+
+ RemoveInfoMarshaller myMarshaller;
+ RemoveInfo myCommand;
+ RemoveInfo* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<RemoveInfo*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void RemoveInfoMarshallerTest::testLooseMarshal() {
+
+ RemoveInfoMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ RemoveInfo outCommand;
+ RemoveInfo inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void RemoveInfoMarshallerTest::testTightMarshal() {
+
+ RemoveInfoMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 5 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ RemoveInfo outCommand;
+ RemoveInfo inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V5_REMOVEINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_REMOVEINFOMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+ /**
+ * Marshalling Test code for Open Wire Format for RemoveInfoMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class RemoveInfoMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( RemoveInfoMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ RemoveInfoMarshallerTest() {}
+ virtual ~RemoveInfoMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_REMOVEINFOMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native