diff --git a/activemq-dotnet/activemq-dotnet.csproj b/activemq-dotnet/activemq-dotnet.csproj index 33b4969e3f..2fcfcb1c0b 100644 --- a/activemq-dotnet/activemq-dotnet.csproj +++ b/activemq-dotnet/activemq-dotnet.csproj @@ -206,15 +206,15 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ActiveMQObjectMessage.cs b/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ActiveMQObjectMessage.cs index faac68cdf5..25d32eaf14 100644 --- a/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ActiveMQObjectMessage.cs +++ b/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ActiveMQObjectMessage.cs @@ -1,56 +1,55 @@ -/* -* Copyright 2006 The Apache Software Foundation or its licensors, as -* applicable. -* -* Licensed 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. -*/ - -using System; -using System.Collections; - -using ActiveMQ.OpenWire; -using ActiveMQ.Commands; -using JMS; - -namespace ActiveMQ.Commands -{ - // - // Marshalling code for Open Wire Format for ActiveMQObjectMessage - // - // - // NOTE!: This file is autogenerated - do not modify! - // if you need to make a change, please see the Groovy scripts in the - // activemq-core module - // - public class ActiveMQObjectMessage : ActiveMQMessage - { - public const byte ID_ActiveMQObjectMessage = 26; - - - public override string ToString() { - return GetType().Name + "[" - + " ]"; - - } - - - - public override byte GetDataStructureType() { - return ID_ActiveMQObjectMessage; - } - - - // Properties - - } -} +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed 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. +*/ + +using System; +using System.Collections; + +using ActiveMQ.OpenWire; +using ActiveMQ.Commands; + +namespace ActiveMQ.Commands +{ + // + // Marshalling code for Open Wire Format for ActiveMQObjectMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQObjectMessage : ActiveMQMessage + { + public const byte ID_ActiveMQObjectMessage = 26; + + + public override string ToString() { + return GetType().Name + "[" + + " ]"; + + } + + + + public override byte GetDataStructureType() { + return ID_ActiveMQObjectMessage; + } + + + // Properties + + } +} diff --git a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/LoggingTransport.cs b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/LoggingTransport.cs index 07f50f93c2..27ea947b1d 100644 --- a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/LoggingTransport.cs +++ b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/LoggingTransport.cs @@ -16,7 +16,6 @@ */ using ActiveMQ.Commands; using ActiveMQ.Transport; -using JMS; using System; namespace ActiveMQ.Transport diff --git a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/MutexTransport.cs b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/MutexTransport.cs index 8630bfd453..f1627a06c6 100644 --- a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/MutexTransport.cs +++ b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/MutexTransport.cs @@ -16,7 +16,6 @@ */ using ActiveMQ.Commands; using ActiveMQ.Transport; -using JMS; using System; namespace ActiveMQ.Transport diff --git a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/ResponseCorrelator.cs b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/ResponseCorrelator.cs index ada353d1d0..a389c351ef 100644 --- a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/ResponseCorrelator.cs +++ b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/ResponseCorrelator.cs @@ -20,7 +20,6 @@ using System.Collections; using ActiveMQ.Commands; using ActiveMQ.Transport; -using JMS; namespace ActiveMQ.Transport { diff --git a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/TransportFilter.cs b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/TransportFilter.cs index 06ccaac4a2..8091796709 100644 --- a/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/TransportFilter.cs +++ b/activemq-dotnet/src/main/csharp/ActiveMQ/Transport/TransportFilter.cs @@ -16,7 +16,6 @@ */ using ActiveMQ.Commands; using ActiveMQ.Transport; -using JMS; using System; namespace ActiveMQ.Transport diff --git a/activemq-dotnet/src/test/csharp/ActiveMQ/OpenWire/BooleanStreamTest.cs b/activemq-dotnet/src/test/csharp/ActiveMQ/OpenWire/BooleanStreamTest.cs index 4dec47c67d..9ee457a49f 100644 --- a/activemq-dotnet/src/test/csharp/ActiveMQ/OpenWire/BooleanStreamTest.cs +++ b/activemq-dotnet/src/test/csharp/ActiveMQ/OpenWire/BooleanStreamTest.cs @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using JMS; using NUnit.Framework; using System; using System.IO; diff --git a/activemq-dotnet/src/test/csharp/JMS/AsyncConsumeTest.cs b/activemq-dotnet/src/test/csharp/NMS/AsyncConsumeTest.cs similarity index 94% rename from activemq-dotnet/src/test/csharp/JMS/AsyncConsumeTest.cs rename to activemq-dotnet/src/test/csharp/NMS/AsyncConsumeTest.cs index 705f2bdc76..6fc6573692 100644 --- a/activemq-dotnet/src/test/csharp/JMS/AsyncConsumeTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/AsyncConsumeTest.cs @@ -20,7 +20,8 @@ using System; using System.Threading; -namespace JMS + +namespace NMS { [TestFixture] public class AsyncConsumeTest : JMSTestSupport @@ -43,7 +44,7 @@ namespace JMS [Test] public void TestAsynchronousConsume() { - + // lets create an async consumer // START SNIPPET: demo IMessageConsumer consumer = session.CreateConsumer(this.Destination); @@ -87,3 +88,4 @@ namespace JMS } } + diff --git a/activemq-dotnet/src/test/csharp/JMS/BadConsumeTest.cs b/activemq-dotnet/src/test/csharp/NMS/BadConsumeTest.cs similarity index 94% rename from activemq-dotnet/src/test/csharp/JMS/BadConsumeTest.cs rename to activemq-dotnet/src/test/csharp/NMS/BadConsumeTest.cs index 5bf6f8a68f..ec328b2212 100644 --- a/activemq-dotnet/src/test/csharp/JMS/BadConsumeTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/BadConsumeTest.cs @@ -19,7 +19,8 @@ using NUnit.Framework; using System; -namespace JMS + +namespace NMS { [TestFixture] public class BadConsumeTest : JMSTestSupport @@ -54,3 +55,4 @@ namespace JMS } } + diff --git a/activemq-dotnet/src/test/csharp/JMS/BytesMessageTest.cs b/activemq-dotnet/src/test/csharp/NMS/BytesMessageTest.cs similarity index 95% rename from activemq-dotnet/src/test/csharp/JMS/BytesMessageTest.cs rename to activemq-dotnet/src/test/csharp/NMS/BytesMessageTest.cs index 9cc42e9e60..73447978c9 100644 --- a/activemq-dotnet/src/test/csharp/JMS/BytesMessageTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/BytesMessageTest.cs @@ -19,7 +19,8 @@ using NUnit.Framework; using System; -namespace JMS + +namespace NMS { [ TestFixture ] public class BytesMessageTest : JMSTestSupport @@ -66,3 +67,4 @@ namespace JMS } + diff --git a/activemq-dotnet/src/test/csharp/JMS/ConsumerTest.cs b/activemq-dotnet/src/test/csharp/NMS/ConsumerTest.cs similarity index 94% rename from activemq-dotnet/src/test/csharp/JMS/ConsumerTest.cs rename to activemq-dotnet/src/test/csharp/NMS/ConsumerTest.cs index 60df8decb6..7b8a0bb44c 100755 --- a/activemq-dotnet/src/test/csharp/JMS/ConsumerTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/ConsumerTest.cs @@ -18,7 +18,8 @@ using NMS; using NUnit.Framework; -namespace JMS + +namespace NMS { [TestFixture] public class ConsumerTest : JMSTestSupport @@ -62,7 +63,7 @@ namespace JMS message.Properties["color"] = "red"; producer.Send(message); - IMessage m = consumer.Receive(receiveTimeout ); + IMessage m = consumer.Receive(receiveTimeout); Assert.IsNotNull(m); Assert.AreEqual("1st", ((ITextMessage)m).Text); @@ -89,3 +90,4 @@ namespace JMS } + diff --git a/activemq-dotnet/src/test/csharp/JMS/JMSPropertyTest.cs b/activemq-dotnet/src/test/csharp/NMS/JMSPropertyTest.cs similarity index 97% rename from activemq-dotnet/src/test/csharp/JMS/JMSPropertyTest.cs rename to activemq-dotnet/src/test/csharp/NMS/JMSPropertyTest.cs index be1c1f1212..23c47086e2 100644 --- a/activemq-dotnet/src/test/csharp/JMS/JMSPropertyTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/JMSPropertyTest.cs @@ -20,7 +20,8 @@ using NUnit.Framework; using System; -namespace JMS + +namespace NMS { [ TestFixture ] public class JMSPropertyTest : JMSTestSupport @@ -136,3 +137,4 @@ namespace JMS } + diff --git a/activemq-dotnet/src/test/csharp/JMS/JMSTestSupport.cs b/activemq-dotnet/src/test/csharp/NMS/JMSTestSupport.cs similarity index 94% rename from activemq-dotnet/src/test/csharp/JMS/JMSTestSupport.cs rename to activemq-dotnet/src/test/csharp/NMS/JMSTestSupport.cs index ef06274092..60fafc08f9 100644 --- a/activemq-dotnet/src/test/csharp/JMS/JMSTestSupport.cs +++ b/activemq-dotnet/src/test/csharp/NMS/JMSTestSupport.cs @@ -21,7 +21,8 @@ using System; /// /// useful base class for test cases /// -namespace JMS + +namespace NMS { [ TestFixture ] public abstract class JMSTestSupport @@ -59,7 +60,7 @@ namespace JMS Assert.IsNotNull(connection != null, "no session created"); Console.WriteLine("Connected."); } - + virtual protected void Disconnect() { @@ -88,7 +89,7 @@ namespace JMS // Should only need to wait for first message to arrive due to the way // prefetching works. IMessage msg = consumer.Receive(receiveTimeout); - while (msg!= null) + while (msg != null) { msg = consumer.ReceiveNoWait(); } @@ -105,14 +106,15 @@ namespace JMS IMessage request = CreateMessage(); producer.Send(request); - + IMessage message = consumer.Receive(receiveTimeout); Assert.IsNotNull(message, "No message returned!"); AssertValidMessage(message); } } - - protected virtual IConnectionFactory CreateConnectionFactory() { + + protected virtual IConnectionFactory CreateConnectionFactory() + { return new ActiveMQ.ConnectionFactory(new Uri("tcp://localhost:61616")); } @@ -126,7 +128,7 @@ namespace JMS IMessageProducer producer = session.CreateProducer(destination); return producer; } - + protected virtual IMessageConsumer CreateConsumer() { IMessageConsumer consumer = session.CreateConsumer(destination); @@ -157,7 +159,8 @@ namespace JMS public IDestination Destination { get { - if( destination == null ) { + if (destination == null) + { destination = CreateDestination(); Assert.IsNotNull(destination, "No destination available!"); Console.WriteLine("Using destination: " + destination); @@ -172,3 +175,4 @@ namespace JMS } } + diff --git a/activemq-dotnet/src/test/csharp/JMS/MapMessageTest.cs b/activemq-dotnet/src/test/csharp/NMS/MapMessageTest.cs similarity index 96% rename from activemq-dotnet/src/test/csharp/JMS/MapMessageTest.cs rename to activemq-dotnet/src/test/csharp/NMS/MapMessageTest.cs index f0d3021ce1..a8281124d9 100644 --- a/activemq-dotnet/src/test/csharp/JMS/MapMessageTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/MapMessageTest.cs @@ -19,7 +19,8 @@ using NUnit.Framework; using System; -namespace JMS + +namespace NMS { [ TestFixture ] public class MapMessageTest : JMSTestSupport @@ -112,7 +113,7 @@ namespace JMS Assert.AreEqual(j, mapMessage.Body.GetShort("j"), "map entry: j"); Assert.AreEqual(k, mapMessage.Body.GetInt("k"), "map entry: k"); Assert.AreEqual(l, mapMessage.Body.GetLong("l"), "map entry: l"); - + } protected string ToHex(long value) @@ -122,3 +123,4 @@ namespace JMS } } + diff --git a/activemq-dotnet/src/test/csharp/JMS/MessageTest.cs b/activemq-dotnet/src/test/csharp/NMS/MessageTest.cs similarity index 96% rename from activemq-dotnet/src/test/csharp/JMS/MessageTest.cs rename to activemq-dotnet/src/test/csharp/NMS/MessageTest.cs index 3a3deb99d1..de3f12e092 100644 --- a/activemq-dotnet/src/test/csharp/JMS/MessageTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/MessageTest.cs @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using JMS; using NMS; using NUnit.Framework; using System; -namespace tests + +namespace NMS { [ TestFixture ] public class MessageTest : JMSTestSupport @@ -119,3 +119,4 @@ namespace tests } } + diff --git a/activemq-dotnet/src/test/csharp/JMS/TextMessage.cs b/activemq-dotnet/src/test/csharp/NMS/TextMessage.cs similarity index 95% rename from activemq-dotnet/src/test/csharp/JMS/TextMessage.cs rename to activemq-dotnet/src/test/csharp/NMS/TextMessage.cs index 8107ed7bd3..5f3cf3a09c 100644 --- a/activemq-dotnet/src/test/csharp/JMS/TextMessage.cs +++ b/activemq-dotnet/src/test/csharp/NMS/TextMessage.cs @@ -19,7 +19,8 @@ using NUnit.Framework; using System; -namespace JMS + +namespace NMS { [ TestFixture ] public class TextMessage : JMSTestSupport @@ -62,3 +63,4 @@ namespace JMS } + diff --git a/activemq-dotnet/src/test/csharp/JMS/TransactionTest.cs b/activemq-dotnet/src/test/csharp/NMS/TransactionTest.cs similarity index 97% rename from activemq-dotnet/src/test/csharp/JMS/TransactionTest.cs rename to activemq-dotnet/src/test/csharp/NMS/TransactionTest.cs index 2ab755f41e..249fe8765b 100644 --- a/activemq-dotnet/src/test/csharp/JMS/TransactionTest.cs +++ b/activemq-dotnet/src/test/csharp/NMS/TransactionTest.cs @@ -19,7 +19,8 @@ using NUnit.Framework; using System; using System.Collections; -namespace JMS + +namespace NMS { [TestFixture] public class TransactionTest : JMSTestSupport @@ -43,7 +44,7 @@ namespace JMS base.TearDown(); } - + [Test] public void TestSendRollback() { @@ -249,3 +250,4 @@ namespace JMS } } +