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 2008/08/14 01:43:02 UTC

svn commit: r685729 [15/17] - in /activemq/activemq-cpp/trunk/src: main/ main/activemq/connector/openwire/ main/activemq/connector/openwire/commands/ main/activemq/connector/openwire/marshal/v3/ main/java/org/apache/activemq/openwire/tool/ test/ test/a...

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/MessageDispatchMarshaller.h>
+#include <activemq/connector/openwire/commands/MessageDispatch.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::MessageDispatchMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchMarshallerTest::test() {
+
+    MessageDispatchMarshaller myMarshaller;
+    MessageDispatch myCommand;
+    MessageDispatch* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<MessageDispatch*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchMarshallerTest::testLooseMarshal() {
+
+    MessageDispatchMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 3 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    MessageDispatch outCommand;
+    MessageDispatch 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 MessageDispatchMarshallerTest::testTightMarshal() {
+
+    MessageDispatchMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 3 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    MessageDispatch outCommand;
+    MessageDispatch 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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_MESSAGEDISPATCHMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_MESSAGEDISPATCHMARSHALLERTEST_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * Marshalling Test code for Open Wire Format for MessageDispatchMarshallerTest
+     *
+     *  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 MessageDispatchMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( MessageDispatchMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        MessageDispatchMarshallerTest() {}
+        virtual ~MessageDispatchMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_MESSAGEDISPATCHMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshaller.h>
+#include <activemq/connector/openwire/commands/MessageDispatchNotification.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::MessageDispatchNotificationMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_MESSAGEDISPATCHNOTIFICATIONMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_MESSAGEDISPATCHNOTIFICATIONMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/MessageIdMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/MessageIdMarshaller.h>
+#include <activemq/connector/openwire/commands/MessageId.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::MessageIdMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessageIdMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_MESSAGEIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_MESSAGEIDMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/MessagePullMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/MessagePullMarshaller.h>
+#include <activemq/connector/openwire/commands/MessagePull.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::MessagePullMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/MessagePullMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_MESSAGEPULLMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_MESSAGEPULLMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshaller.h>
+#include <activemq/connector/openwire/commands/NetworkBridgeFilter.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::NetworkBridgeFilterMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_NETWORKBRIDGEFILTERMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_NETWORKBRIDGEFILTERMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/PartialCommandMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/PartialCommandMarshaller.h>
+#include <activemq/connector/openwire/commands/PartialCommand.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::PartialCommandMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/PartialCommandMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_PARTIALCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_PARTIALCOMMANDMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/ProducerAckMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/ProducerAckMarshaller.h>
+#include <activemq/connector/openwire/commands/ProducerAck.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::ProducerAckMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerAckMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_PRODUCERACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_PRODUCERACKMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/ProducerIdMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/ProducerIdMarshaller.h>
+#include <activemq/connector/openwire/commands/ProducerId.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::ProducerIdMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerIdMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_PRODUCERIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_PRODUCERIDMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.cpp?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.cpp Wed Aug 13 16:42:56 2008
@@ -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/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/ProducerInfoMarshaller.h>
+#include <activemq/connector/openwire/commands/ProducerInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::ProducerInfoMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/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::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+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( 3 );
+    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( 3 );
+    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 );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.h?rev=685729&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ProducerInfoMarshallerTest.h Wed Aug 13 16:42:56 2008
@@ -0,0 +1,67 @@
+/*
+ * 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_MARSAHAL_V3_PRODUCERINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_PRODUCERINFOMARSHALLERTEST_H_*/
+