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 2010/06/09 00:47:52 UTC
svn commit: r952853 [15/18] - in
/activemq/activemq-cpp/trunk/activemq-cpp/src: main/
main/activemq/wireformat/openwire/marshal/v6/ test/
test/activemq/wireformat/openwire/marshal/v6/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/DiscoveryEventMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshaller.h>
+#include <activemq/commands/DiscoveryEvent.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/DiscoveryEventMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_DISCOVERYEVENTMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_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 wireformat{
+namespace openwire{
+namespace marshal{
+namespace v6{
+
+ /**
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V6_DISCOVERYEVENTMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/DiscoveryEventMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/ExceptionResponseMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshaller.h>
+#include <activemq/commands/ExceptionResponse.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/ExceptionResponseMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_EXCEPTIONRESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_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 wireformat{
+namespace openwire{
+namespace marshal{
+namespace v6{
+
+ /**
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V6_EXCEPTIONRESPONSEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/ExceptionResponseMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/FlushCommandMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/FlushCommandMarshaller.h>
+#include <activemq/commands/FlushCommand.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/FlushCommandMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_FLUSHCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_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 wireformat{
+namespace openwire{
+namespace marshal{
+namespace v6{
+
+ /**
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V6_FLUSHCOMMANDMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/FlushCommandMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/IntegerResponseMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshaller.h>
+#include <activemq/commands/IntegerResponse.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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( 6 );
+ 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/IntegerResponseMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_INTEGERRESPONSEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_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 wireformat{
+namespace openwire{
+namespace marshal{
+namespace v6{
+
+ /**
+ * 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_WIREFORMAT_OPENWIRE_MARSAHAL_V6_INTEGERRESPONSEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/IntegerResponseMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/JournalQueueAckMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshaller.h>
+#include <activemq/commands/JournalQueueAck.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalQueueAckMarshallerTest::test() {
+
+ JournalQueueAckMarshaller myMarshaller;
+ JournalQueueAck myCommand;
+ JournalQueueAck* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<JournalQueueAck*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalQueueAckMarshallerTest::testLooseMarshal() {
+
+ JournalQueueAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ JournalQueueAck outCommand;
+ JournalQueueAck 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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 JournalQueueAckMarshallerTest::testTightMarshal() {
+
+ JournalQueueAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ JournalQueueAck outCommand;
+ JournalQueueAck 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/JournalQueueAckMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_JOURNALQUEUEACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALQUEUEACKMARSHALLERTEST_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 v6{
+
+ /**
+ * Marshalling Test code for Open Wire Format for JournalQueueAckMarshallerTest
+ *
+ * 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 JournalQueueAckMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( JournalQueueAckMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ JournalQueueAckMarshallerTest() {}
+ virtual ~JournalQueueAckMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALQUEUEACKMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalQueueAckMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/JournalTopicAckMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshaller.h>
+#include <activemq/commands/JournalTopicAck.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalTopicAckMarshallerTest::test() {
+
+ JournalTopicAckMarshaller myMarshaller;
+ JournalTopicAck myCommand;
+ JournalTopicAck* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<JournalTopicAck*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalTopicAckMarshallerTest::testLooseMarshal() {
+
+ JournalTopicAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ JournalTopicAck outCommand;
+ JournalTopicAck 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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 JournalTopicAckMarshallerTest::testTightMarshal() {
+
+ JournalTopicAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ JournalTopicAck outCommand;
+ JournalTopicAck 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/JournalTopicAckMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_JOURNALTOPICACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALTOPICACKMARSHALLERTEST_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 v6{
+
+ /**
+ * Marshalling Test code for Open Wire Format for JournalTopicAckMarshallerTest
+ *
+ * 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 JournalTopicAckMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( JournalTopicAckMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ JournalTopicAckMarshallerTest() {}
+ virtual ~JournalTopicAckMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALTOPICACKMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTopicAckMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/JournalTraceMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/JournalTraceMarshaller.h>
+#include <activemq/commands/JournalTrace.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalTraceMarshallerTest::test() {
+
+ JournalTraceMarshaller myMarshaller;
+ JournalTrace myCommand;
+ JournalTrace* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<JournalTrace*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalTraceMarshallerTest::testLooseMarshal() {
+
+ JournalTraceMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ JournalTrace outCommand;
+ JournalTrace 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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 JournalTraceMarshallerTest::testTightMarshal() {
+
+ JournalTraceMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ JournalTrace outCommand;
+ JournalTrace 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/JournalTraceMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_JOURNALTRACEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALTRACEMARSHALLERTEST_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 v6{
+
+ /**
+ * Marshalling Test code for Open Wire Format for JournalTraceMarshallerTest
+ *
+ * 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 JournalTraceMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( JournalTraceMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ JournalTraceMarshallerTest() {}
+ virtual ~JournalTraceMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALTRACEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTraceMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/JournalTransactionMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshaller.h>
+#include <activemq/commands/JournalTransaction.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalTransactionMarshallerTest::test() {
+
+ JournalTransactionMarshaller myMarshaller;
+ JournalTransaction myCommand;
+ JournalTransaction* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<JournalTransaction*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void JournalTransactionMarshallerTest::testLooseMarshal() {
+
+ JournalTransactionMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ JournalTransaction outCommand;
+ JournalTransaction 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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 JournalTransactionMarshallerTest::testTightMarshal() {
+
+ JournalTransactionMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ JournalTransaction outCommand;
+ JournalTransaction 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/JournalTransactionMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.h?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.h Tue Jun 8 22:47:47 2010
@@ -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_V6_JOURNALTRANSACTIONMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALTRANSACTIONMARSHALLERTEST_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 v6{
+
+ /**
+ * Marshalling Test code for Open Wire Format for JournalTransactionMarshallerTest
+ *
+ * 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 JournalTransactionMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( JournalTransactionMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ JournalTransactionMarshallerTest() {}
+ virtual ~JournalTransactionMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V6_JOURNALTRANSACTIONMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/JournalTransactionMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/KeepAliveInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/KeepAliveInfoMarshallerTest.cpp?rev=952853&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/KeepAliveInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v6/KeepAliveInfoMarshallerTest.cpp Tue Jun 8 22:47:47 2010
@@ -0,0 +1,157 @@
+/*
+ * 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/v6/KeepAliveInfoMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/v6/KeepAliveInfoMarshaller.h>
+#include <activemq/commands/KeepAliveInfo.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.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>
+#include <decaf/lang/Pointer.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::v6;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void KeepAliveInfoMarshallerTest::test() {
+
+ KeepAliveInfoMarshaller myMarshaller;
+ KeepAliveInfo myCommand;
+ KeepAliveInfo* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<KeepAliveInfo*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void KeepAliveInfoMarshallerTest::testLooseMarshal() {
+
+ KeepAliveInfoMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ KeepAliveInfo outCommand;
+ KeepAliveInfo 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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 KeepAliveInfoMarshallerTest::testTightMarshal() {
+
+ KeepAliveInfoMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ KeepAliveInfo outCommand;
+ KeepAliveInfo 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.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ 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/v6/KeepAliveInfoMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native