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 2007/10/23 20:21:46 UTC

svn commit: r587587 [4/14] - in /activemq/activemq-cpp/trunk/src: main/activemq/connector/openwire/commands/ main/activemq/connector/openwire/marshal/v1/ main/activemq/connector/openwire/marshal/v2/ main/java/org/apache/activemq/openwire/tool/ test/ te...

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/ConsumerInfoMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/ConsumerInfoMarshaller.h>
+#include <activemq/connector/openwire/commands/ConsumerInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::ConsumerInfoMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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/v1/ConsumerInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_CONSUMERINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v1{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V1_CONSUMERINFOMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/ControlCommandMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/ControlCommandMarshaller.h>
+#include <activemq/connector/openwire/commands/ControlCommand.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::ControlCommandMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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/v1/ControlCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_CONTROLCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v1{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V1_CONTROLCOMMANDMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/DataArrayResponseMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/DataArrayResponseMarshaller.h>
+#include <activemq/connector/openwire/commands/DataArrayResponse.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::DataArrayResponseMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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/v1/DataArrayResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_DATAARRAYRESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_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 connector{
+namespace openwire{
+namespace marshal{
+namespace v1{
+
+    /**
+     * 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_CONNECTOR_OPENWIRE_MARSAHAL_V1_DATAARRAYRESPONSEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/DataResponseMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/DataResponseMarshaller.h>
+#include <activemq/connector/openwire/commands/DataResponse.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::DataResponseMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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( 1 );
+    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.getByteArray(), baos.getByteArraySize() );
+        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/v1/DataResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_DATARESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_DATARESPONSEMARSHALLERTEST_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 v1{
+
+    /**
+     * Marshalling Test code for Open Wire Format for DataResponseMarshallerTest
+     *
+     *  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 DataResponseMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( DataResponseMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        DataResponseMarshallerTest() {}
+        virtual ~DataResponseMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_DATARESPONSEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/DestinationInfoMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/DestinationInfoMarshaller.h>
+#include <activemq/connector/openwire/commands/DestinationInfo.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::DestinationInfoMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+void DestinationInfoMarshallerTest::test() {
+
+    DestinationInfoMarshaller myMarshaller;
+    DestinationInfo myCommand;
+    DestinationInfo* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<DestinationInfo*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void DestinationInfoMarshallerTest::testLooseMarshal() {
+
+    DestinationInfoMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    DestinationInfo outCommand;
+    DestinationInfo 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.getByteArray(), baos.getByteArraySize() );
+        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 DestinationInfoMarshallerTest::testTightMarshal() {
+
+    DestinationInfoMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    DestinationInfo outCommand;
+    DestinationInfo 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.getByteArray(), baos.getByteArraySize() );
+        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/v1/DestinationInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_DESTINATIONINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_DESTINATIONINFOMARSHALLERTEST_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 v1{
+
+    /**
+     * Marshalling Test code for Open Wire Format for DestinationInfoMarshallerTest
+     *
+     *  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 DestinationInfoMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( DestinationInfoMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        DestinationInfoMarshallerTest() {}
+        virtual ~DestinationInfoMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_DESTINATIONINFOMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/DiscoveryEventMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/DiscoveryEventMarshaller.h>
+#include <activemq/connector/openwire/commands/DiscoveryEvent.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::DiscoveryEventMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+void DiscoveryEventMarshallerTest::test() {
+
+    DiscoveryEventMarshaller myMarshaller;
+    DiscoveryEvent myCommand;
+    DiscoveryEvent* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<DiscoveryEvent*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void DiscoveryEventMarshallerTest::testLooseMarshal() {
+
+    DiscoveryEventMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    DiscoveryEvent outCommand;
+    DiscoveryEvent 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.getByteArray(), baos.getByteArraySize() );
+        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 DiscoveryEventMarshallerTest::testTightMarshal() {
+
+    DiscoveryEventMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    DiscoveryEvent outCommand;
+    DiscoveryEvent 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.getByteArray(), baos.getByteArraySize() );
+        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/v1/DiscoveryEventMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_DISCOVERYEVENTMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_DISCOVERYEVENTMARSHALLERTEST_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 v1{
+
+    /**
+     * Marshalling Test code for Open Wire Format for DiscoveryEventMarshallerTest
+     *
+     *  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 DiscoveryEventMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( DiscoveryEventMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        DiscoveryEventMarshallerTest() {}
+        virtual ~DiscoveryEventMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_DISCOVERYEVENTMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/ExceptionResponseMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/ExceptionResponseMarshaller.h>
+#include <activemq/connector/openwire/commands/ExceptionResponse.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::ExceptionResponseMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+void ExceptionResponseMarshallerTest::test() {
+
+    ExceptionResponseMarshaller myMarshaller;
+    ExceptionResponse myCommand;
+    ExceptionResponse* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ExceptionResponse*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ExceptionResponseMarshallerTest::testLooseMarshal() {
+
+    ExceptionResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ExceptionResponse outCommand;
+    ExceptionResponse 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.getByteArray(), baos.getByteArraySize() );
+        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 ExceptionResponseMarshallerTest::testTightMarshal() {
+
+    ExceptionResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ExceptionResponse outCommand;
+    ExceptionResponse 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.getByteArray(), baos.getByteArraySize() );
+        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/v1/ExceptionResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_EXCEPTIONRESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_EXCEPTIONRESPONSEMARSHALLERTEST_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 v1{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ExceptionResponseMarshallerTest
+     *
+     *  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 ExceptionResponseMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ExceptionResponseMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ExceptionResponseMarshallerTest() {}
+        virtual ~ExceptionResponseMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_EXCEPTIONRESPONSEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/FlushCommandMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/FlushCommandMarshaller.h>
+#include <activemq/connector/openwire/commands/FlushCommand.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::FlushCommandMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+void FlushCommandMarshallerTest::test() {
+
+    FlushCommandMarshaller myMarshaller;
+    FlushCommand myCommand;
+    FlushCommand* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<FlushCommand*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FlushCommandMarshallerTest::testLooseMarshal() {
+
+    FlushCommandMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    FlushCommand outCommand;
+    FlushCommand 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.getByteArray(), baos.getByteArraySize() );
+        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 FlushCommandMarshallerTest::testTightMarshal() {
+
+    FlushCommandMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    FlushCommand outCommand;
+    FlushCommand 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.getByteArray(), baos.getByteArraySize() );
+        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/v1/FlushCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_FLUSHCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_FLUSHCOMMANDMARSHALLERTEST_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 v1{
+
+    /**
+     * Marshalling Test code for Open Wire Format for FlushCommandMarshallerTest
+     *
+     *  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 FlushCommandMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( FlushCommandMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        FlushCommandMarshallerTest() {}
+        virtual ~FlushCommandMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_FLUSHCOMMANDMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * 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/v1/IntegerResponseMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v1/IntegerResponseMarshaller.h>
+#include <activemq/connector/openwire/commands/IntegerResponse.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v1::IntegerResponseMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/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::io;
+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::v1;
+
+///////////////////////////////////////////////////////////////////////////////
+void IntegerResponseMarshallerTest::test() {
+
+    IntegerResponseMarshaller myMarshaller;
+    IntegerResponse myCommand;
+    IntegerResponse* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<IntegerResponse*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void IntegerResponseMarshallerTest::testLooseMarshal() {
+
+    IntegerResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    IntegerResponse outCommand;
+    IntegerResponse 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.getByteArray(), baos.getByteArraySize() );
+        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 IntegerResponseMarshallerTest::testTightMarshal() {
+
+    IntegerResponseMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 1 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    IntegerResponse outCommand;
+    IntegerResponse 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.getByteArray(), baos.getByteArraySize() );
+        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/v1/IntegerResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -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_V1_INTEGERRESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_INTEGERRESPONSEMARSHALLERTEST_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 v1{
+
+    /**
+     * Marshalling Test code for Open Wire Format for IntegerResponseMarshallerTest
+     *
+     *  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 IntegerResponseMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( IntegerResponseMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        IntegerResponseMarshallerTest() {}
+        virtual ~IntegerResponseMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V1_INTEGERRESPONSEMARSHALLERTEST_H_*/
+