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/16 16:17:09 UTC
svn commit: r955237 [16/19] - in
/activemq/activemq-cpp/trunk/activemq-cpp/src: main/
main/activemq/wireformat/openwire/
main/activemq/wireformat/openwire/marshal/generated/
main/activemq/wireformat/openwire/marshal/universal/ test/
test/activemq/wiref...
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/JournalQueueAckMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/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::generated;
+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/generated/JournalQueueAckMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_JOURNALQUEUEACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_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 generated{
+
+ /**
+ * 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_GENERATED_JOURNALQUEUEACKMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/JournalTopicAckMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/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::generated;
+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/generated/JournalTopicAckMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_JOURNALTOPICACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_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 generated{
+
+ /**
+ * 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_GENERATED_JOURNALTOPICACKMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/JournalTraceMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/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::generated;
+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/generated/JournalTraceMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_JOURNALTRACEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_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 generated{
+
+ /**
+ * 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_GENERATED_JOURNALTRACEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/JournalTransactionMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/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::generated;
+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/generated/JournalTransactionMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_JOURNALTRANSACTIONMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_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 generated{
+
+ /**
+ * 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_GENERATED_JOURNALTRANSACTIONMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/KeepAliveInfoMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/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::generated;
+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/generated/KeepAliveInfoMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_KEEPALIVEINFOMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_KEEPALIVEINFOMARSHALLERTEST_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 generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for KeepAliveInfoMarshallerTest
+ *
+ * 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 KeepAliveInfoMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( KeepAliveInfoMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ KeepAliveInfoMarshallerTest() {}
+ virtual ~KeepAliveInfoMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_KEEPALIVEINFOMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/LastPartialCommandMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshaller.h>
+#include <activemq/commands/LastPartialCommand.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::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void LastPartialCommandMarshallerTest::test() {
+
+ LastPartialCommandMarshaller myMarshaller;
+ LastPartialCommand myCommand;
+ LastPartialCommand* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<LastPartialCommand*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void LastPartialCommandMarshallerTest::testLooseMarshal() {
+
+ LastPartialCommandMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ LastPartialCommand outCommand;
+ LastPartialCommand 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 LastPartialCommandMarshallerTest::testTightMarshal() {
+
+ LastPartialCommandMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ LastPartialCommand outCommand;
+ LastPartialCommand 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/generated/LastPartialCommandMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_LASTPARTIALCOMMANDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_LASTPARTIALCOMMANDMARSHALLERTEST_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 generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for LastPartialCommandMarshallerTest
+ *
+ * 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 LastPartialCommandMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( LastPartialCommandMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ LastPartialCommandMarshallerTest() {}
+ virtual ~LastPartialCommandMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_LASTPARTIALCOMMANDMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/LocalTransactionIdMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshaller.h>
+#include <activemq/commands/LocalTransactionId.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::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void LocalTransactionIdMarshallerTest::test() {
+
+ LocalTransactionIdMarshaller myMarshaller;
+ LocalTransactionId myCommand;
+ LocalTransactionId* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<LocalTransactionId*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void LocalTransactionIdMarshallerTest::testLooseMarshal() {
+
+ LocalTransactionIdMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ LocalTransactionId outCommand;
+ LocalTransactionId 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 LocalTransactionIdMarshallerTest::testTightMarshal() {
+
+ LocalTransactionIdMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ LocalTransactionId outCommand;
+ LocalTransactionId 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/generated/LocalTransactionIdMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_LOCALTRANSACTIONIDMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_LOCALTRANSACTIONIDMARSHALLERTEST_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 generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for LocalTransactionIdMarshallerTest
+ *
+ * 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 LocalTransactionIdMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( LocalTransactionIdMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ LocalTransactionIdMarshallerTest() {}
+ virtual ~LocalTransactionIdMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_LOCALTRANSACTIONIDMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/MessageAckMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/MessageAckMarshaller.h>
+#include <activemq/commands/MessageAck.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::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageAckMarshallerTest::test() {
+
+ MessageAckMarshaller myMarshaller;
+ MessageAck myCommand;
+ MessageAck* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<MessageAck*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageAckMarshallerTest::testLooseMarshal() {
+
+ MessageAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ MessageAck outCommand;
+ MessageAck 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 MessageAckMarshallerTest::testTightMarshal() {
+
+ MessageAckMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ MessageAck outCommand;
+ MessageAck 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/generated/MessageAckMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.h Wed Jun 16 14:17:04 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_GENERATED_MESSAGEACKMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_MESSAGEACKMARSHALLERTEST_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 generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for MessageAckMarshallerTest
+ *
+ * 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 MessageAckMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( MessageAckMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ MessageAckMarshallerTest() {}
+ virtual ~MessageAckMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_MESSAGEACKMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshallerTest.cpp Wed Jun 16 14:17:04 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/generated/MessageDispatchMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshaller.h>
+#include <activemq/commands/MessageDispatch.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::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchMarshallerTest::test() {
+
+ MessageDispatchMarshaller myMarshaller;
+ MessageDispatch myCommand;
+ MessageDispatch* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<MessageDispatch*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void MessageDispatchMarshallerTest::testLooseMarshal() {
+
+ MessageDispatchMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ MessageDispatch outCommand;
+ MessageDispatch inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ 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 MessageDispatchMarshallerTest::testTightMarshal() {
+
+ MessageDispatchMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ MessageDispatch outCommand;
+ MessageDispatch inCommand;
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ 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/generated/MessageDispatchMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native