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 [26/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/v4/ConnectionControlMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionControlMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionControlMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionControlMarshallerTest.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_V4_CONNECTIONCONTROLMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONCONTROLMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConnectionControlMarshallerTest
+     *
+     *  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 ConnectionControlMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConnectionControlMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConnectionControlMarshallerTest() {}
+        virtual ~ConnectionControlMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONCONTROLMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionControlMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.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/v4/ConnectionErrorMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshaller.h>
+#include <activemq/commands/ConnectionError.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ConnectionErrorMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ConnectionErrorMarshallerTest::test() {
+
+    ConnectionErrorMarshaller myMarshaller;
+    ConnectionError myCommand;
+    ConnectionError* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ConnectionError*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ConnectionErrorMarshallerTest::testLooseMarshal() {
+
+    ConnectionErrorMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ConnectionError outCommand;
+    ConnectionError 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 ConnectionErrorMarshallerTest::testTightMarshal() {
+
+    ConnectionErrorMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ConnectionError outCommand;
+    ConnectionError 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/v4/ConnectionErrorMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.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_V4_CONNECTIONERRORMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONERRORMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConnectionErrorMarshallerTest
+     *
+     *  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 ConnectionErrorMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConnectionErrorMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConnectionErrorMarshallerTest() {}
+        virtual ~ConnectionErrorMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONERRORMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.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/v4/ConnectionIdMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshaller.h>
+#include <activemq/commands/ConnectionId.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ConnectionIdMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ConnectionIdMarshallerTest::test() {
+
+    ConnectionIdMarshaller myMarshaller;
+    ConnectionId myCommand;
+    ConnectionId* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ConnectionId*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ConnectionIdMarshallerTest::testLooseMarshal() {
+
+    ConnectionIdMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ConnectionId outCommand;
+    ConnectionId 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 ConnectionIdMarshallerTest::testTightMarshal() {
+
+    ConnectionIdMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ConnectionId outCommand;
+    ConnectionId 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/v4/ConnectionIdMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.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_V4_CONNECTIONIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONIDMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConnectionIdMarshallerTest
+     *
+     *  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 ConnectionIdMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConnectionIdMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConnectionIdMarshallerTest() {}
+        virtual ~ConnectionIdMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONIDMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.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/v4/ConnectionInfoMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshaller.h>
+#include <activemq/commands/ConnectionInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ConnectionInfoMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ConnectionInfoMarshallerTest::test() {
+
+    ConnectionInfoMarshaller myMarshaller;
+    ConnectionInfo myCommand;
+    ConnectionInfo* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ConnectionInfo*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ConnectionInfoMarshallerTest::testLooseMarshal() {
+
+    ConnectionInfoMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ConnectionInfo outCommand;
+    ConnectionInfo 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 ConnectionInfoMarshallerTest::testTightMarshal() {
+
+    ConnectionInfoMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ConnectionInfo outCommand;
+    ConnectionInfo 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/v4/ConnectionInfoMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.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_V4_CONNECTIONINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONINFOMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConnectionInfoMarshallerTest
+     *
+     *  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 ConnectionInfoMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConnectionInfoMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConnectionInfoMarshallerTest() {}
+        virtual ~ConnectionInfoMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONNECTIONINFOMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.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/v4/ConsumerControlMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshaller.h>
+#include <activemq/commands/ConsumerControl.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ConsumerControlMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ConsumerControlMarshallerTest::test() {
+
+    ConsumerControlMarshaller myMarshaller;
+    ConsumerControl myCommand;
+    ConsumerControl* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ConsumerControl*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ConsumerControlMarshallerTest::testLooseMarshal() {
+
+    ConsumerControlMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ConsumerControl outCommand;
+    ConsumerControl 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 ConsumerControlMarshallerTest::testTightMarshal() {
+
+    ConsumerControlMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ConsumerControl outCommand;
+    ConsumerControl 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/v4/ConsumerControlMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.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_V4_CONSUMERCONTROLMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONSUMERCONTROLMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConsumerControlMarshallerTest
+     *
+     *  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 ConsumerControlMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConsumerControlMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConsumerControlMarshallerTest() {}
+        virtual ~ConsumerControlMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONSUMERCONTROLMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.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/v4/ConsumerIdMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshaller.h>
+#include <activemq/commands/ConsumerId.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ConsumerIdMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ConsumerIdMarshallerTest::test() {
+
+    ConsumerIdMarshaller myMarshaller;
+    ConsumerId myCommand;
+    ConsumerId* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ConsumerId*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ConsumerIdMarshallerTest::testLooseMarshal() {
+
+    ConsumerIdMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ConsumerId outCommand;
+    ConsumerId 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 ConsumerIdMarshallerTest::testTightMarshal() {
+
+    ConsumerIdMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ConsumerId outCommand;
+    ConsumerId 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/v4/ConsumerIdMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.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_V4_CONSUMERIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONSUMERIDMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConsumerIdMarshallerTest
+     *
+     *  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 ConsumerIdMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConsumerIdMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConsumerIdMarshallerTest() {}
+        virtual ~ConsumerIdMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONSUMERIDMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.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/v4/ConsumerInfoMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshaller.h>
+#include <activemq/commands/ConsumerInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ConsumerInfoMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ConsumerInfoMarshallerTest::test() {
+
+    ConsumerInfoMarshaller myMarshaller;
+    ConsumerInfo myCommand;
+    ConsumerInfo* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ConsumerInfo*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ConsumerInfoMarshallerTest::testLooseMarshal() {
+
+    ConsumerInfoMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ConsumerInfo outCommand;
+    ConsumerInfo 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 ConsumerInfoMarshallerTest::testTightMarshal() {
+
+    ConsumerInfoMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ConsumerInfo outCommand;
+    ConsumerInfo 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/v4/ConsumerInfoMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.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_V4_CONSUMERINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONSUMERINFOMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ConsumerInfoMarshallerTest
+     *
+     *  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 ConsumerInfoMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ConsumerInfoMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ConsumerInfoMarshallerTest() {}
+        virtual ~ConsumerInfoMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONSUMERINFOMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.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/v4/ControlCommandMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/ControlCommandMarshaller.h>
+#include <activemq/commands/ControlCommand.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::ControlCommandMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ControlCommandMarshallerTest::test() {
+
+    ControlCommandMarshaller myMarshaller;
+    ControlCommand myCommand;
+    ControlCommand* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ControlCommand*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ControlCommandMarshallerTest::testLooseMarshal() {
+
+    ControlCommandMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ControlCommand outCommand;
+    ControlCommand 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 ControlCommandMarshallerTest::testTightMarshal() {
+
+    ControlCommandMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ControlCommand outCommand;
+    ControlCommand 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/v4/ControlCommandMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.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_V4_CONTROLCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONTROLCOMMANDMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ControlCommandMarshallerTest
+     *
+     *  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 ControlCommandMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ControlCommandMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ControlCommandMarshallerTest() {}
+        virtual ~ControlCommandMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONTROLCOMMANDMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.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/v4/DataArrayResponseMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.h>
+#include <activemq/commands/DataArrayResponse.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::DataArrayResponseMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void DataArrayResponseMarshallerTest::test() {
+
+    DataArrayResponseMarshaller myMarshaller;
+    DataArrayResponse myCommand;
+    DataArrayResponse* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<DataArrayResponse*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void DataArrayResponseMarshallerTest::testLooseMarshal() {
+
+    DataArrayResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    DataArrayResponse outCommand;
+    DataArrayResponse 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 DataArrayResponseMarshallerTest::testTightMarshal() {
+
+    DataArrayResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    DataArrayResponse outCommand;
+    DataArrayResponse 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/v4/DataArrayResponseMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.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_V4_DATAARRAYRESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_DATAARRAYRESPONSEMARSHALLERTEST_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 v4{
+
+    /**
+     * Marshalling Test code for Open Wire Format for DataArrayResponseMarshallerTest
+     *
+     *  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 DataArrayResponseMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( DataArrayResponseMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        DataArrayResponseMarshallerTest() {}
+        virtual ~DataArrayResponseMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_DATAARRAYRESPONSEMARSHALLERTEST_H_*/

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataResponseMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataResponseMarshallerTest.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/v4/DataResponseMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.h>
+#include <activemq/commands/DataResponse.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v4::DataResponseMarshallerTest );
+
+#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::v4;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void DataResponseMarshallerTest::test() {
+
+    DataResponseMarshaller myMarshaller;
+    DataResponse myCommand;
+    DataResponse* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<DataResponse*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void DataResponseMarshallerTest::testLooseMarshal() {
+
+    DataResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    DataResponse outCommand;
+    DataResponse 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 DataResponseMarshallerTest::testTightMarshal() {
+
+    DataResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 4 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    DataResponse outCommand;
+    DataResponse 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/v4/DataResponseMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native