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 [31/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...

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBytesMessageMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBytesMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBytesMessageMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBytesMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBytesMessageMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQBytesMessageMarshallerTest
+     *
+     *  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 ActiveMQBytesMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQBytesMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQBytesMessageMarshallerTest() {}
+        virtual ~ActiveMQBytesMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshaller.h>
+#include <activemq/commands/ActiveMQMapMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQMapMessageMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::test() {
+
+    ActiveMQMapMessageMarshaller myMarshaller;
+    ActiveMQMapMessage myCommand;
+    ActiveMQMapMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQMapMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQMapMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQMapMessage outCommand;
+    ActiveMQMapMessage 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 ActiveMQMapMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQMapMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQMapMessage outCommand;
+    ActiveMQMapMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQMapMessageMarshallerTest
+     *
+     *  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 ActiveMQMapMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQMapMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQMapMessageMarshallerTest() {}
+        virtual ~ActiveMQMapMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshaller.h>
+#include <activemq/commands/ActiveMQMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQMessageMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMessageMarshallerTest::test() {
+
+    ActiveMQMessageMarshaller myMarshaller;
+    ActiveMQMessage myCommand;
+    ActiveMQMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQMessage outCommand;
+    ActiveMQMessage 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 ActiveMQMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQMessage outCommand;
+    ActiveMQMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQMessageMarshallerTest
+     *
+     *  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 ActiveMQMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQMessageMarshallerTest() {}
+        virtual ~ActiveMQMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQMESSAGEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshaller.h>
+#include <activemq/commands/ActiveMQObjectMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQObjectMessageMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQObjectMessageMarshallerTest::test() {
+
+    ActiveMQObjectMessageMarshaller myMarshaller;
+    ActiveMQObjectMessage myCommand;
+    ActiveMQObjectMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQObjectMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQObjectMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQObjectMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQObjectMessage outCommand;
+    ActiveMQObjectMessage 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 ActiveMQObjectMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQObjectMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQObjectMessage outCommand;
+    ActiveMQObjectMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQOBJECTMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQOBJECTMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQObjectMessageMarshallerTest
+     *
+     *  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 ActiveMQObjectMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQObjectMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQObjectMessageMarshallerTest() {}
+        virtual ~ActiveMQObjectMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQOBJECTMESSAGEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshaller.h>
+#include <activemq/commands/ActiveMQQueue.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQQueueMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQQueueMarshallerTest::test() {
+
+    ActiveMQQueueMarshaller myMarshaller;
+    ActiveMQQueue myCommand;
+    ActiveMQQueue* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQQueue*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQQueueMarshallerTest::testLooseMarshal() {
+
+    ActiveMQQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQQueue outCommand;
+    ActiveMQQueue 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 ActiveMQQueueMarshallerTest::testTightMarshal() {
+
+    ActiveMQQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQQueue outCommand;
+    ActiveMQQueue inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQQUEUEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQQUEUEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQQueueMarshallerTest
+     *
+     *  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 ActiveMQQueueMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQQueueMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQQueueMarshallerTest() {}
+        virtual ~ActiveMQQueueMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQQUEUEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshaller.h>
+#include <activemq/commands/ActiveMQStreamMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQStreamMessageMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQStreamMessageMarshallerTest::test() {
+
+    ActiveMQStreamMessageMarshaller myMarshaller;
+    ActiveMQStreamMessage myCommand;
+    ActiveMQStreamMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQStreamMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQStreamMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQStreamMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQStreamMessage outCommand;
+    ActiveMQStreamMessage 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 ActiveMQStreamMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQStreamMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQStreamMessage outCommand;
+    ActiveMQStreamMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQSTREAMMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQSTREAMMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQStreamMessageMarshallerTest
+     *
+     *  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 ActiveMQStreamMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQStreamMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQStreamMessageMarshallerTest() {}
+        virtual ~ActiveMQStreamMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQSTREAMMESSAGEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshaller.h>
+#include <activemq/commands/ActiveMQTempQueue.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQTempQueueMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempQueueMarshallerTest::test() {
+
+    ActiveMQTempQueueMarshaller myMarshaller;
+    ActiveMQTempQueue myCommand;
+    ActiveMQTempQueue* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQTempQueue*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempQueueMarshallerTest::testLooseMarshal() {
+
+    ActiveMQTempQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQTempQueue outCommand;
+    ActiveMQTempQueue 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 ActiveMQTempQueueMarshallerTest::testTightMarshal() {
+
+    ActiveMQTempQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQTempQueue outCommand;
+    ActiveMQTempQueue inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEMPQUEUEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEMPQUEUEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQTempQueueMarshallerTest
+     *
+     *  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 ActiveMQTempQueueMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQTempQueueMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQTempQueueMarshallerTest() {}
+        virtual ~ActiveMQTempQueueMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEMPQUEUEMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshaller.h>
+#include <activemq/commands/ActiveMQTempTopic.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQTempTopicMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempTopicMarshallerTest::test() {
+
+    ActiveMQTempTopicMarshaller myMarshaller;
+    ActiveMQTempTopic myCommand;
+    ActiveMQTempTopic* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQTempTopic*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempTopicMarshallerTest::testLooseMarshal() {
+
+    ActiveMQTempTopicMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQTempTopic outCommand;
+    ActiveMQTempTopic 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 ActiveMQTempTopicMarshallerTest::testTightMarshal() {
+
+    ActiveMQTempTopicMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQTempTopic outCommand;
+    ActiveMQTempTopic inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEMPTOPICMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEMPTOPICMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQTempTopicMarshallerTest
+     *
+     *  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 ActiveMQTempTopicMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQTempTopicMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQTempTopicMarshallerTest() {}
+        virtual ~ActiveMQTempTopicMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEMPTOPICMARSHALLERTEST_H_*/

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.cpp?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.cpp Fri Jul 24 20:09:31 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshaller.h>
+#include <activemq/commands/ActiveMQTextMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::v5::ActiveMQTextMessageMarshallerTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::v5;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTextMessageMarshallerTest::test() {
+
+    ActiveMQTextMessageMarshaller myMarshaller;
+    ActiveMQTextMessage myCommand;
+    ActiveMQTextMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQTextMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTextMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQTextMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQTextMessage outCommand;
+    ActiveMQTextMessage 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 ActiveMQTextMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQTextMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 5 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQTextMessage outCommand;
+    ActiveMQTextMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.h?rev=797633&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.h Fri Jul 24 20:09:31 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEXTMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEXTMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace v5{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQTextMessageMarshallerTest
+     *
+     *  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 ActiveMQTextMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQTextMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQTextMessageMarshallerTest() {}
+        virtual ~ActiveMQTextMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V5_ACTIVEMQTEXTMESSAGEMARSHALLERTEST_H_*/

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