activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r1450322 - in /activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp: ./ Commands/
Date Tue, 26 Feb 2013 18:12:55 GMT
Author: jgomes
Date: Tue Feb 26 18:12:54 2013
New Revision: 1450322

URL: http://svn.apache.org/r1450322
Log:
Unit Test cleanup:
1. Fix FilterIgnoredMessagesTest.  It would get blocked by producer flow control and fail to run.
2. Standardized the destination naming convention to prefix names with "TEST.".
3. Standardized destination creation API.

All tests pass on ActiveMQ 5.7.0.

Modified:
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/RequestResponseTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/StreamMessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/XmlMessageTest.cs

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs Tue Feb 26 18:12:54 2013
@@ -24,7 +24,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class AsyncConsumeTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "AsyncConsumeDestination";
 		protected string RESPONSE_CLIENT_ID;
 		protected AutoResetEvent semaphore;
 		protected bool received;
@@ -58,7 +57,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{
@@ -87,7 +86,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{
 						producer.DeliveryMode = deliveryMode;
@@ -118,7 +117,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{
@@ -148,7 +147,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					{
 						consumer.Listener += new MessageListener(OnMessage);
@@ -184,7 +183,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					ITemporaryQueue tempReplyDestination = session.CreateTemporaryQueue();
 
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs Tue Feb 26 18:12:54 2013
@@ -24,7 +24,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class BytesMessageTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "BytesMessageDestination";
 		protected byte[] msgContent = {1, 2, 3, 4, 5, 6, 7, 8};
 
 		[Test]
@@ -37,7 +36,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{
@@ -65,7 +64,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs Tue Feb 26 18:12:54 2013
@@ -155,38 +155,6 @@ namespace Apache.NMS.Commands
         }
 
         /// <summary>
-        /// Create a Destination
-        /// </summary>
-        /// <param name="type"></param>
-        /// <param name="pyhsicalName"></param>
-        /// <returns></returns>
-        public static Destination CreateDestination(int type, String pyhsicalName)
-        {
-            Destination result = null;
-            if(pyhsicalName == null)
-            {
-                return null;
-            }
-            else if(type == TOPIC)
-            {
-                result = new Topic(pyhsicalName);
-            }
-            else if(type == TEMPORARY_TOPIC)
-            {
-                result = new TempTopic(pyhsicalName);
-            }
-            else if(type == QUEUE)
-            {
-                result = new Queue(pyhsicalName);
-            }
-            else
-            {
-                result = new TempQueue(pyhsicalName);
-            }
-            return result;
-        }
-
-        /// <summary>
         /// Create a temporary name from the clientId
         /// </summary>
         /// <param name="clientId"></param>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs Tue Feb 26 18:12:54 2013
@@ -75,8 +75,8 @@ namespace Apache.NMS.Test
 
 				using(ISession session = connection.CreateSession())
 				{
-					IQueue queue = session.GetQueue("DisposalTestQueue");
-					IMessageConsumer consumer = session.CreateConsumer(queue);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
+					IMessageConsumer consumer = session.CreateConsumer(destination);
 
 					connection.Stop();
 					if(disposeConsumer)
@@ -98,8 +98,8 @@ namespace Apache.NMS.Test
 
 				using(ISession session = connection.CreateSession())
 				{
-					IQueue queue = session.GetQueue("DisposalTestQueue");
-					IMessageProducer producer = session.CreateProducer(queue);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
+					IMessageProducer producer = session.CreateProducer(destination);
 
 					connection.Stop();
 					if(disposeProducer)
@@ -146,7 +146,7 @@ namespace Apache.NMS.Test
             ISession stoppedSession = stoppedConnection.CreateSession(AcknowledgementMode.AutoAcknowledge);
     
             // Setup the consumers.
-            ITopic topic = startedSession.GetTopic("ConnectionTestTopic");
+            IDestination topic = CreateDestination(startedSession, DestinationType.Topic);
             IMessageConsumer startedConsumer = startedSession.CreateConsumer(topic);
             IMessageConsumer stoppedConsumer = stoppedSession.CreateConsumer(topic);
     

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs Tue Feb 26 18:12:54 2013
@@ -317,12 +317,12 @@ namespace Apache.NMS.Test
             {
                 connection.Start();
                 ISession session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
-                IQueue queue = session.GetQueue(Guid.NewGuid().ToString());
-                IMessageProducer producer = session.CreateProducer(queue);
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
+                IMessageProducer producer = session.CreateProducer(destination);
                 producer.Send(session.CreateTextMessage("Hello"));
 
                 // Consume the message...
-                IMessageConsumer consumer = session.CreateConsumer(queue);
+                IMessageConsumer consumer = session.CreateConsumer(destination);
                 IMessage msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
                 Assert.IsNotNull(msg);
                 msg.Acknowledge();
@@ -332,7 +332,7 @@ namespace Apache.NMS.Test
                 session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
 
                 // Attempt to Consume the message...
-                consumer = session.CreateConsumer(queue);
+                consumer = session.CreateConsumer(destination);
                 msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
                 Assert.IsNull(msg);
 
@@ -347,14 +347,14 @@ namespace Apache.NMS.Test
             {
                 connection.Start();
                 ISession session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
-                IQueue queue = session.GetQueue(Guid.NewGuid().ToString());
-                IMessageProducer producer = session.CreateProducer(queue);
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
+                IMessageProducer producer = session.CreateProducer(destination);
                 producer.Send(session.CreateTextMessage("Hello"));
                 producer.Send(session.CreateTextMessage("Hello2"));
                 producer.Send(session.CreateTextMessage("Hello3"));
 
                 // Consume the message...
-                IMessageConsumer consumer = session.CreateConsumer(queue);
+                IMessageConsumer consumer = session.CreateConsumer(destination);
                 IMessage msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
                 Assert.IsNotNull(msg);
                 msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
@@ -368,7 +368,7 @@ namespace Apache.NMS.Test
                 session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
 
                 // Attempt to Consume the message...
-                consumer = session.CreateConsumer(queue);
+                consumer = session.CreateConsumer(destination);
                 msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
                 Assert.IsNull(msg);
 
@@ -383,12 +383,12 @@ namespace Apache.NMS.Test
             {
                 connection.Start();
                 ISession session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
-                IQueue queue = session.GetQueue(Guid.NewGuid().ToString());
-                IMessageProducer producer = session.CreateProducer(queue);
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
+                IMessageProducer producer = session.CreateProducer(destination);
                 producer.Send(session.CreateTextMessage("Hello"));
 
                 // Consume the message...
-                IMessageConsumer consumer = session.CreateConsumer(queue);
+                IMessageConsumer consumer = session.CreateConsumer(destination);
                 IMessage msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
                 Assert.IsNotNull(msg);
                 // Don't ack the message.
@@ -398,7 +398,7 @@ namespace Apache.NMS.Test
                 session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
 
                 // Attempt to Consume the message...
-                consumer = session.CreateConsumer(queue);
+                consumer = session.CreateConsumer(destination);
                 msg = consumer.Receive(TimeSpan.FromMilliseconds(2000));
                 Assert.IsNotNull(msg);
                 msg.Acknowledge();
@@ -414,12 +414,12 @@ namespace Apache.NMS.Test
             {
                 connection.Start();
                 ISession session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
-                IQueue queue = session.GetQueue(Guid.NewGuid().ToString());
-                IMessageProducer producer = session.CreateProducer(queue);
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
+                IMessageProducer producer = session.CreateProducer(destination);
                 producer.Send(session.CreateTextMessage("Hello"));
 
                 // Consume the message...
-                IMessageConsumer consumer = session.CreateConsumer(queue);
+                IMessageConsumer consumer = session.CreateConsumer(destination);
                 consumer.Listener += new MessageListener(OnMessage);
 
                 Thread.Sleep(5000);
@@ -430,7 +430,7 @@ namespace Apache.NMS.Test
                 session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
 
                 // Attempt to Consume the message...
-                consumer = session.CreateConsumer(queue);
+                consumer = session.CreateConsumer(destination);
                 IMessage msg = consumer.Receive(TimeSpan.FromMilliseconds(1000));
                 Assert.IsNull(msg);
 
@@ -447,12 +447,12 @@ namespace Apache.NMS.Test
                 // don't aknowledge message on onMessage() call
                 dontAck = true;
                 ISession session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
-                IQueue queue = session.GetQueue("Guid.NewGuid().ToString()");
-                IMessageProducer producer = session.CreateProducer(queue);
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
+                IMessageProducer producer = session.CreateProducer(destination);
                 producer.Send(session.CreateTextMessage("Hello"));
 
                 // Consume the message...
-                IMessageConsumer consumer = session.CreateConsumer(queue);
+                IMessageConsumer consumer = session.CreateConsumer(destination);
                 consumer.Listener += new MessageListener(OnMessage);
                 // Don't ack the message.
 
@@ -463,7 +463,7 @@ namespace Apache.NMS.Test
                 Thread.Sleep(5000);
                 session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
                 // Attempt to Consume the message...
-                consumer = session.CreateConsumer(queue);
+                consumer = session.CreateConsumer(destination);
                 IMessage msg = consumer.Receive(TimeSpan.FromMilliseconds(2000));
                 Assert.IsNotNull(msg);
                 msg.Acknowledge();

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs Tue Feb 26 18:12:54 2013
@@ -25,7 +25,7 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class DurableTest : NMSTestSupport
 	{
-		protected static string DURABLE_TOPIC = "TestDurableConsumerTopic";
+		protected static string DURABLE_TOPIC = "topic://TEST.DurableConsumerTopic";
 		protected static string DURABLE_SELECTOR = "2 > 1";
 
 		protected string TEST_CLIENT_AND_CONSUMER_ID;
@@ -46,7 +46,6 @@ namespace Apache.NMS.Test
 				AcknowledgementMode.DupsOkAcknowledge, AcknowledgementMode.Transactional)]
 			AcknowledgementMode ackMode)
 		{
-			string TEST_DURABLE_TOPIC = DURABLE_TOPIC + ":TestSendWhileClosed";
 			try
 			{				
 		        using(IConnection connection = CreateConnection(TEST_CLIENT_AND_CONSUMER_ID))
@@ -55,7 +54,7 @@ namespace Apache.NMS.Test
 					
 					using(ISession session = connection.CreateSession(ackMode))
 					{
-						ITopic topic = session.GetTopic(TEST_DURABLE_TOPIC);
+						ITopic topic = (ITopic) CreateDestination(session, DestinationType.Topic);
 						IMessageProducer producer = session.CreateProducer(topic);
 
 						producer.DeliveryMode = MsgDeliveryMode.Persistent;
@@ -110,8 +109,6 @@ namespace Apache.NMS.Test
 				AcknowledgementMode.DupsOkAcknowledge, AcknowledgementMode.Transactional)]
 			AcknowledgementMode ackMode)
 		{
-			string TEST_DURABLE_TOPIC = DURABLE_TOPIC + ":TestDurableConsumerSelectorChange";
-
 			try
 			{
 				using(IConnection connection = CreateConnection(TEST_CLIENT_AND_CONSUMER_ID))
@@ -119,7 +116,7 @@ namespace Apache.NMS.Test
 					connection.Start();
 					using(ISession session = connection.CreateSession(ackMode))
 					{
-						ITopic topic = session.GetTopic(TEST_DURABLE_TOPIC);
+						ITopic topic = (ITopic) CreateDestination(session, DestinationType.Topic);
 						IMessageProducer producer = session.CreateProducer(topic);
 						IMessageConsumer consumer = session.CreateDurableConsumer(topic, TEST_CLIENT_AND_CONSUMER_ID, "color='red'", false);
 

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs Tue Feb 26 18:12:54 2013
@@ -27,8 +27,6 @@ namespace Apache.NMS.Test
     [TestFixture]
     public class ForeignMessageTransformationTest : NMSTestSupport
     {
-        protected static string DESTINATION_NAME = "topic://MessageTransformationDestination";
-
         private string propertyName = "Test-Property";
         private string propertyValue = "Test-Property-Value";
         private string mapElementName = "Test-Map-Property";
@@ -61,7 +59,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Topic);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {
@@ -102,7 +100,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Topic);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {
@@ -147,7 +145,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Topic);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {
@@ -194,7 +192,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Topic);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {
@@ -240,7 +238,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Topic);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs Tue Feb 26 18:12:54 2013
@@ -25,8 +25,6 @@ namespace Apache.NMS.Test
     [TestFixture]
     public class MapMessageTest : NMSTestSupport
     {
-        protected static string DESTINATION_NAME = "MessagePropsDestination";
-
         protected bool a = true;
         protected byte b = 123;
         protected char c = 'c';
@@ -53,7 +51,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {
@@ -130,7 +128,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs Tue Feb 26 18:12:54 2013
@@ -26,8 +26,8 @@ namespace Apache.NMS.Test
 	[Category("LongRunning")]
 	public class MessageSelectorTest : NMSTestSupport
 	{
-		protected const string QUEUE_DESTINATION_NAME = "queue://MessageSelectorQueue";
-		protected const string TOPIC_DESTINATION_NAME = "topic://MessageSelectorTopic";
+		protected const string QUEUE_DESTINATION_NAME = "queue://TEST.MessageSelectorQueue";
+		protected const string TOPIC_DESTINATION_NAME = "topic://TEST.MessageSelectorTopic";
 
 		private int receivedNonIgnoredMsgCount = 0;
 		private int receivedIgnoredMsgCount = 0;
@@ -77,8 +77,8 @@ namespace Apache.NMS.Test
 				using(ISession session3 = connection3.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
 					IDestination destination1 = CreateDestination(session1, destinationName);
-					IDestination destination2 = SessionUtil.GetDestination(session2, destinationName);
-					IDestination destination3 = SessionUtil.GetDestination(session3, destinationName);
+					IDestination destination2 = CreateDestination(session2, destinationName);
+					IDestination destination3 = CreateDestination(session3, destinationName);
 
 					using(IMessageProducer producer = session1.CreateProducer(destination1))
 					using(IMessageConsumer consumer1 = session2.CreateConsumer(destination2, "JMSType NOT LIKE '%IGNORE'"))
@@ -111,7 +111,7 @@ namespace Apache.NMS.Test
 
 							producer.Send(request);
 
-							if(20000 == index)
+							if(2000 == index)
 							{
 								// Start the second consumer
 								if(destination3.IsTopic)

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs Tue Feb 26 18:12:54 2013
@@ -26,8 +26,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class MessageTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "MessagePropsDestination";
-
 		protected bool		a = true;
 		protected byte		b = 123;
 		protected char		c = 'c';
@@ -54,7 +52,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs Tue Feb 26 18:12:54 2013
@@ -24,8 +24,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class NMSPropertyTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "NMSPropsDestination";
-
 		// standard NMS properties
 		protected string expectedText = "Hey this works!";
 		protected string correlationID = "FooBar";
@@ -44,7 +42,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs Tue Feb 26 18:12:54 2013
@@ -25,557 +25,574 @@ using NUnit.Framework;
 
 namespace Apache.NMS.Test
 {
-    /// <summary>
-    /// useful base class for test cases
-    /// </summary>
-    public abstract class NMSTestSupport
-    {
-        private NMSConnectionFactory NMSFactory;
-        protected TimeSpan receiveTimeout = TimeSpan.FromMilliseconds(15000);
-        protected string clientId;
-        protected string passWord;
-        protected string userName;
-        protected int testRun;
-        protected int idCounter;
-
-        static NMSTestSupport()
-        {
-            Apache.NMS.Tracer.Trace = new NmsTracer();
-        }
-
-        public NMSTestSupport()
-        {
-        }
-
-        [SetUp]
-        public virtual void SetUp()
-        {
-            this.testRun++;
-        }
-
-        [TearDown]
-        public virtual void TearDown()
-        {
-        }
-
-        // Properties
-
-        /// <summary>
-        /// The connection factory interface property.
-        /// </summary>
-        public IConnectionFactory Factory
-        {
-            get
-            {
-                if(null == NMSFactory)
-                {
-                    Assert.IsTrue(CreateNMSFactory(), "Error creating factory.");
-                }
-
-                return NMSFactory.ConnectionFactory;
-            }
-        }
-
-        /// <summary>
-        /// Name of the connection configuration filename.
-        /// </summary>
-        /// <returns></returns>
-        protected virtual string GetConnectionConfigFileName() { return "nmsprovider-test.config"; }
-
-        /// <summary>
-        /// The name of the connection configuration that CreateNMSFactory() will load.
-        /// </summary>
-        /// <returns></returns>
-        protected virtual string GetNameTestURI() { return "defaultURI"; }
-
-        /// <summary>
-        /// Create the NMS Factory that can create NMS Connections.
-        /// </summary>
-        /// <returns></returns>
-        protected bool CreateNMSFactory()
-        {
-            return CreateNMSFactory(GetNameTestURI());
-        }
-
-        /// <summary>
-        /// Return the configured URI String.  This function loads the connection
-        /// settings from the configuration file.
-        /// </summary>
-        /// <returns></returns>
-        protected string GetConfiguredConnectionURI()
-        {
-            Uri brokerUri = null;
-            string[] paths = GetConfigSearchPaths();
-            string connectionConfigFileName = GetConnectionConfigFileName();
-            bool configFound = false;
-
-            foreach(string path in paths)
-            {
-                string fullpath = Path.Combine(path, connectionConfigFileName);
-                Tracer.Debug("\tScanning folder: " + path);
-
-                if(File.Exists(fullpath))
-                {
-                    Tracer.Debug("\tAssembly found!");
-                    connectionConfigFileName = fullpath;
-                    configFound = true;
-                    break;
-                }
-            }
-
-            Assert.IsTrue(configFound, "Connection configuration file does not exist.");
-            XmlDocument configDoc = new XmlDocument();
-
-            configDoc.Load(connectionConfigFileName);
-            XmlElement uriNode = (XmlElement) configDoc.SelectSingleNode(String.Format("/configuration/{0}", GetNameTestURI()));
-
-            if(null != uriNode)
-            {
-                // Replace any environment variables embedded inside the string.
-                brokerUri = new Uri(ReplaceEnvVar(uriNode.GetAttribute("value")));
-            }
-
-            return brokerUri.ToString();
-        }
-
-        /// <summary>
-        /// Create the NMS Factory that can create NMS Connections.  This function loads the
-        /// connection settings from the configuration file.
-        /// </summary>
-        /// <param name="nameTestURI">The named connection configuration.</param>
-        /// <returns></returns>
-        protected bool CreateNMSFactory(string nameTestURI)
-        {
-            Uri brokerUri = null;
-            string[] paths = GetConfigSearchPaths();
-            object[] factoryParams = null;
-            string connectionConfigFileName = GetConnectionConfigFileName();
-            bool configFound = false;
-
-            foreach(string path in paths)
-            {
-                string fullpath = Path.Combine(path, connectionConfigFileName);
-                Tracer.Debug("\tScanning folder: " + path);
-
-                if(File.Exists(fullpath))
-                {
-                    Tracer.Debug("\tAssembly found!");
-                    connectionConfigFileName = fullpath;
-                    configFound = true;
-                    break;
-                }
-            }
-
-            Assert.IsTrue(configFound, "Connection configuration file does not exist.");
-            XmlDocument configDoc = new XmlDocument();
-
-            configDoc.Load(connectionConfigFileName);
-            XmlElement uriNode = (XmlElement) configDoc.SelectSingleNode(String.Format("/configuration/{0}", nameTestURI));
-
-            if(null != uriNode)
-            {
-                // Replace any environment variables embedded inside the string.
-                brokerUri = new Uri(ReplaceEnvVar(uriNode.GetAttribute("value")));
-                factoryParams = GetFactoryParams(uriNode);
-                clientId = ReplaceEnvVar(GetNodeValueAttribute(uriNode, "clientId", "NMSTestClientId"));
-                userName = ReplaceEnvVar(GetNodeValueAttribute(uriNode, "userName", "guest"));
-                passWord = ReplaceEnvVar(GetNodeValueAttribute(uriNode, "passWord", "guest"));
-            }
-
-            if(null == factoryParams)
-            {
-                NMSFactory = new Apache.NMS.NMSConnectionFactory(brokerUri);
-            }
-            else
-            {
-                NMSFactory = new Apache.NMS.NMSConnectionFactory(brokerUri, factoryParams);
-            }
-
-            return (null != NMSFactory);
-        }
-
-        private static string[] GetConfigSearchPaths()
-        {
-            ArrayList pathList = new ArrayList();
+	/// <summary>
+	/// useful base class for test cases
+	/// </summary>
+	public abstract class NMSTestSupport
+	{
+		private NMSConnectionFactory NMSFactory;
+		protected TimeSpan receiveTimeout = TimeSpan.FromMilliseconds(15000);
+		protected string clientId;
+		protected string passWord;
+		protected string userName;
+		protected int testRun;
+		protected int idCounter;
+
+		static NMSTestSupport()
+		{
+			Apache.NMS.Tracer.Trace = new NmsTracer();
+		}
+
+		public NMSTestSupport()
+		{
+		}
+
+		[SetUp]
+		public virtual void SetUp()
+		{
+			this.testRun++;
+		}
+
+		[TearDown]
+		public virtual void TearDown()
+		{
+		}
+
+		// Properties
+
+		/// <summary>
+		/// The connection factory interface property.
+		/// </summary>
+		public IConnectionFactory Factory
+		{
+			get
+			{
+				if(null == NMSFactory)
+				{
+					Assert.IsTrue(CreateNMSFactory(), "Error creating factory.");
+				}
+
+				return NMSFactory.ConnectionFactory;
+			}
+		}
+
+		/// <summary>
+		/// Name of the connection configuration filename.
+		/// </summary>
+		/// <returns></returns>
+		protected virtual string GetConnectionConfigFileName() { return "nmsprovider-test.config"; }
+
+		/// <summary>
+		/// The name of the connection configuration that CreateNMSFactory() will load.
+		/// </summary>
+		/// <returns></returns>
+		protected virtual string GetNameTestURI() { return "defaultURI"; }
+
+		/// <summary>
+		/// Create the NMS Factory that can create NMS Connections.
+		/// </summary>
+		/// <returns></returns>
+		protected bool CreateNMSFactory()
+		{
+			return CreateNMSFactory(GetNameTestURI());
+		}
+
+		/// <summary>
+		/// Return the configured URI String.  This function loads the connection
+		/// settings from the configuration file.
+		/// </summary>
+		/// <returns></returns>
+		protected string GetConfiguredConnectionURI()
+		{
+			Uri brokerUri = null;
+			string[] paths = GetConfigSearchPaths();
+			string connectionConfigFileName = GetConnectionConfigFileName();
+			bool configFound = false;
+
+			foreach(string path in paths)
+			{
+				string fullpath = Path.Combine(path, connectionConfigFileName);
+				Tracer.Debug("\tScanning folder: " + path);
+
+				if(File.Exists(fullpath))
+				{
+					Tracer.Debug("\tAssembly found!");
+					connectionConfigFileName = fullpath;
+					configFound = true;
+					break;
+				}
+			}
+
+			Assert.IsTrue(configFound, "Connection configuration file does not exist.");
+			XmlDocument configDoc = new XmlDocument();
+
+			configDoc.Load(connectionConfigFileName);
+			XmlElement uriNode = (XmlElement) configDoc.SelectSingleNode(String.Format("/configuration/{0}", GetNameTestURI()));
+
+			if(null != uriNode)
+			{
+				// Replace any environment variables embedded inside the string.
+				brokerUri = new Uri(ReplaceEnvVar(uriNode.GetAttribute("value")));
+			}
+
+			return brokerUri.ToString();
+		}
+
+		/// <summary>
+		/// Create the NMS Factory that can create NMS Connections.  This function loads the
+		/// connection settings from the configuration file.
+		/// </summary>
+		/// <param name="nameTestURI">The named connection configuration.</param>
+		/// <returns></returns>
+		protected bool CreateNMSFactory(string nameTestURI)
+		{
+			Uri brokerUri = null;
+			string[] paths = GetConfigSearchPaths();
+			object[] factoryParams = null;
+			string connectionConfigFileName = GetConnectionConfigFileName();
+			bool configFound = false;
+
+			foreach(string path in paths)
+			{
+				string fullpath = Path.Combine(path, connectionConfigFileName);
+				Tracer.Debug("\tScanning folder: " + path);
+
+				if(File.Exists(fullpath))
+				{
+					Tracer.Debug("\tAssembly found!");
+					connectionConfigFileName = fullpath;
+					configFound = true;
+					break;
+				}
+			}
+
+			Assert.IsTrue(configFound, "Connection configuration file does not exist.");
+			XmlDocument configDoc = new XmlDocument();
+
+			configDoc.Load(connectionConfigFileName);
+			XmlElement uriNode = (XmlElement) configDoc.SelectSingleNode(String.Format("/configuration/{0}", nameTestURI));
+
+			if(null != uriNode)
+			{
+				// Replace any environment variables embedded inside the string.
+				brokerUri = new Uri(ReplaceEnvVar(uriNode.GetAttribute("value")));
+				factoryParams = GetFactoryParams(uriNode);
+				clientId = ReplaceEnvVar(GetNodeValueAttribute(uriNode, "clientId", "NMSTestClientId"));
+				userName = ReplaceEnvVar(GetNodeValueAttribute(uriNode, "userName", "guest"));
+				passWord = ReplaceEnvVar(GetNodeValueAttribute(uriNode, "passWord", "guest"));
+			}
+
+			if(null == factoryParams)
+			{
+				NMSFactory = new Apache.NMS.NMSConnectionFactory(brokerUri);
+			}
+			else
+			{
+				NMSFactory = new Apache.NMS.NMSConnectionFactory(brokerUri, factoryParams);
+			}
+
+			return (null != NMSFactory);
+		}
+
+		private static string[] GetConfigSearchPaths()
+		{
+			ArrayList pathList = new ArrayList();
 
-            // Check the current folder first.
-            pathList.Add("");
+			// Check the current folder first.
+			pathList.Add("");
 #if !NETCF
-            AppDomain currentDomain = AppDomain.CurrentDomain;
+			AppDomain currentDomain = AppDomain.CurrentDomain;
 
-            // Check the folder the assembly is located in.
-            pathList.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
-            if(null != currentDomain.BaseDirectory)
-            {
-                pathList.Add(currentDomain.BaseDirectory);
-            }
-
-            if(null != currentDomain.RelativeSearchPath)
-            {
-                pathList.Add(currentDomain.RelativeSearchPath);
-            }
+			// Check the folder the assembly is located in.
+			pathList.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
+			if(null != currentDomain.BaseDirectory)
+			{
+				pathList.Add(currentDomain.BaseDirectory);
+			}
+
+			if(null != currentDomain.RelativeSearchPath)
+			{
+				pathList.Add(currentDomain.RelativeSearchPath);
+			}
 #endif
 
-            return (string[]) pathList.ToArray(typeof(string));
-        }
+			return (string[]) pathList.ToArray(typeof(string));
+		}
 
-        /// <summary>
-        /// Get the parameters for the ConnectionFactory from the configuration file.
-        /// </summary>
-        /// <param name="uriNode">Parent node of the factoryParams node.</param>
-        /// <returns>Object array of parameter objects to be passsed to provider factory object.  Null if no parameters are specified in configuration file.</returns>
-        protected object[] GetFactoryParams(XmlElement uriNode)
-        {
-            ArrayList factoryParams = new ArrayList();
-            XmlElement factoryParamsNode = (XmlElement) uriNode.SelectSingleNode("factoryParams");
-
-            if(null != factoryParamsNode)
-            {
-                XmlNodeList nodeList = factoryParamsNode.SelectNodes("param");
-
-                if(null != nodeList)
-                {
-                    foreach(XmlElement paramNode in nodeList)
-                    {
-                        string paramType = paramNode.GetAttribute("type");
-                        string paramValue = ReplaceEnvVar(paramNode.GetAttribute("value"));
-
-                        switch(paramType)
-                        {
-                        case "string":
-                            factoryParams.Add(paramValue);
-                            break;
-
-                        case "int":
-                            factoryParams.Add(int.Parse(paramValue));
-                            break;
-
-                        // TODO: Add more parameter types
-                        }
-                    }
-                }
-            }
-
-            if(factoryParams.Count > 0)
-            {
-                return factoryParams.ToArray();
-            }
-
-            return null;
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="parentNode"></param>
-        /// <param name="nodeName"></param>
-        /// <param name="dflt"></param>
-        /// <returns></returns>
-        protected static string GetNodeValueAttribute(XmlElement parentNode, string nodeName, string dflt)
-        {
-            XmlElement node = (XmlElement) parentNode.SelectSingleNode(nodeName);
-            string val;
-
-            if(null != node)
-            {
-                val = node.GetAttribute("value");
-            }
-            else
-            {
-                val = dflt;
-            }
-
-            return val;
-        }
-
-        /// <summary>
-        /// Replace embedded variable markups with environment variable values.
-        /// Variable markups are of the following form:
-        ///		${varname}
-        /// </summary>
-        /// <param name="srcText"></param>
-        /// <returns></returns>
-        public static string ReplaceEnvVar(string srcText)
-        {
-            // NOTE: Might be able to refactor to be more generic and support full variable
-            // names that can be pulled from the environment.  Currently, we only support limited
-            // hard-coded variable names.
-
-            string defaultBroker = GetEnvVar("NMSTestBroker", "activemqhost");
-
-            srcText = ReplaceEnvVar(srcText, "ActiveMQHost", defaultBroker);
-            srcText = ReplaceEnvVar(srcText, "ActiveMQBackupHost", defaultBroker);
-
-            srcText = ReplaceEnvVar(srcText, "TIBCOHost", defaultBroker);
-            srcText = ReplaceEnvVar(srcText, "TIBCOBackupHost", defaultBroker);
-
-            srcText = ReplaceEnvVar(srcText, "MSMQHost", defaultBroker);
-            srcText = ReplaceEnvVar(srcText, "MSMQBackupHost", defaultBroker);
-            return srcText;
-        }
-
-        /// <summary>
-        /// Replace the variable with environment variable.
-        /// </summary>
-        /// <param name="srcText"></param>
-        /// <param name="varName"></param>
-        /// <param name="defaultValue"></param>
-        /// <returns></returns>
-        public static string ReplaceEnvVar(string srcText, string varName, string defaultValue)
-        {
-            string replacementValue = GetEnvVar(varName, defaultValue);
-            return Regex.Replace(srcText, "\\${" + varName + "}", replacementValue, RegexOptions.IgnoreCase);
-        }
-
-        /// <summary>
-        /// Get environment variable value.
-        /// </summary>
-        /// <param name="varName"></param>
-        /// <param name="defaultValue"></param>
-        /// <returns></returns>
-        public static string GetEnvVar(string varName, string defaultValue)
-        {
+		/// <summary>
+		/// Get the parameters for the ConnectionFactory from the configuration file.
+		/// </summary>
+		/// <param name="uriNode">Parent node of the factoryParams node.</param>
+		/// <returns>Object array of parameter objects to be passsed to provider factory object.  Null if no parameters are specified in configuration file.</returns>
+		protected object[] GetFactoryParams(XmlElement uriNode)
+		{
+			ArrayList factoryParams = new ArrayList();
+			XmlElement factoryParamsNode = (XmlElement) uriNode.SelectSingleNode("factoryParams");
+
+			if(null != factoryParamsNode)
+			{
+				XmlNodeList nodeList = factoryParamsNode.SelectNodes("param");
+
+				if(null != nodeList)
+				{
+					foreach(XmlElement paramNode in nodeList)
+					{
+						string paramType = paramNode.GetAttribute("type");
+						string paramValue = ReplaceEnvVar(paramNode.GetAttribute("value"));
+
+						switch(paramType)
+						{
+							case "string":
+								factoryParams.Add(paramValue);
+								break;
+
+							case "int":
+								factoryParams.Add(int.Parse(paramValue));
+								break;
+
+							// TODO: Add more parameter types
+						}
+					}
+				}
+			}
+
+			if(factoryParams.Count > 0)
+			{
+				return factoryParams.ToArray();
+			}
+
+			return null;
+		}
+
+		/// <summary>
+		///
+		/// </summary>
+		/// <param name="parentNode"></param>
+		/// <param name="nodeName"></param>
+		/// <param name="dflt"></param>
+		/// <returns></returns>
+		protected static string GetNodeValueAttribute(XmlElement parentNode, string nodeName, string dflt)
+		{
+			XmlElement node = (XmlElement) parentNode.SelectSingleNode(nodeName);
+			string val;
+
+			if(null != node)
+			{
+				val = node.GetAttribute("value");
+			}
+			else
+			{
+				val = dflt;
+			}
+
+			return val;
+		}
+
+		/// <summary>
+		/// Replace embedded variable markups with environment variable values.
+		/// Variable markups are of the following form:
+		///		${varname}
+		/// </summary>
+		/// <param name="srcText"></param>
+		/// <returns></returns>
+		public static string ReplaceEnvVar(string srcText)
+		{
+			// NOTE: Might be able to refactor to be more generic and support full variable
+			// names that can be pulled from the environment.  Currently, we only support limited
+			// hard-coded variable names.
+
+			string defaultBroker = GetEnvVar("NMSTestBroker", "activemqhost");
+
+			srcText = ReplaceEnvVar(srcText, "ActiveMQHost", defaultBroker);
+			srcText = ReplaceEnvVar(srcText, "ActiveMQBackupHost", defaultBroker);
+
+			srcText = ReplaceEnvVar(srcText, "TIBCOHost", defaultBroker);
+			srcText = ReplaceEnvVar(srcText, "TIBCOBackupHost", defaultBroker);
+
+			srcText = ReplaceEnvVar(srcText, "MSMQHost", defaultBroker);
+			srcText = ReplaceEnvVar(srcText, "MSMQBackupHost", defaultBroker);
+			return srcText;
+		}
+
+		/// <summary>
+		/// Replace the variable with environment variable.
+		/// </summary>
+		/// <param name="srcText"></param>
+		/// <param name="varName"></param>
+		/// <param name="defaultValue"></param>
+		/// <returns></returns>
+		public static string ReplaceEnvVar(string srcText, string varName, string defaultValue)
+		{
+			string replacementValue = GetEnvVar(varName, defaultValue);
+			return Regex.Replace(srcText, "\\${" + varName + "}", replacementValue, RegexOptions.IgnoreCase);
+		}
+
+		/// <summary>
+		/// Get environment variable value.
+		/// </summary>
+		/// <param name="varName"></param>
+		/// <param name="defaultValue"></param>
+		/// <returns></returns>
+		public static string GetEnvVar(string varName, string defaultValue)
+		{
 #if (PocketPC||NETCF||NETCF_2_0)
             string varValue = null;
 #else
-            string varValue = Environment.GetEnvironmentVariable(varName);
+			string varValue = Environment.GetEnvironmentVariable(varName);
 #endif
-            if(null == varValue)
-            {
-                varValue = defaultValue;
-            }
-
-            return varValue;
-        }
-
-        public virtual string GetTestClientId()
-        {
-
-            System.Text.StringBuilder id = new System.Text.StringBuilder();
-
-            id.Append("ID:");
-            id.Append(this.GetType().Name);
-            id.Append(":");
-            id.Append(this.testRun);
-            id.Append(":");
-            id.Append(++idCounter);
-
-            return id.ToString();
-        }
-
-        /// <summary>
-        /// Create a new connection to the broker.
-        /// </summary>
-        /// <returns></returns>
-        public virtual IConnection CreateConnection()
-        {
-            return CreateConnection(null);
-        }
-
-        /// <summary>
-        /// Create a new connection to the broker.
-        /// </summary>
-        /// <param name="newClientId">Client ID of the new connection.</param>
-        /// <returns></returns>
-        public virtual IConnection CreateConnection(string newClientId)
-        {
-            IConnection newConnection = Factory.CreateConnection(userName, passWord);
-            Assert.IsNotNull(newConnection, "connection not created");
-            if(newClientId != null)
-            {
-                newConnection.ClientId = newClientId;
-            }
-
-            return newConnection;
-        }
-
-        /// <summary>
-        /// Create a destination.  This will delete an existing destination and re-create it.
-        /// </summary>
-        /// <param name="session"></param>
-        /// <param name="destinationName"></param>
-        /// <returns></returns>
-        public virtual IDestination CreateDestination(ISession session, string destinationName)
-        {
-            try
-            {
-                SessionUtil.DeleteDestination(session, destinationName);
-            }
-            catch(Exception)
-            {
-                // Can't delete it, so lets try and purse it.
-                IDestination destination = SessionUtil.GetDestination(session, destinationName);
-
-                using(IMessageConsumer consumer = session.CreateConsumer(destination))
-                {
-                    while(consumer.Receive(TimeSpan.FromMilliseconds(750)) != null)
-                    {
-                    }
-                }
-            }
-
-            return SessionUtil.GetDestination(session, destinationName);
-        }
-
-        /// <summary>
-        /// Register a durable consumer
-        /// </summary>
-        /// <param name="connectionID">Connection ID of the consumer.</param>
-        /// <param name="destination">Destination name to register.  Supports embedded prefix names.</param>
-        /// <param name="consumerID">Name of the durable consumer.</param>
-        /// <param name="selector">Selector parameters for consumer.</param>
-        /// <param name="noLocal"></param>
-        protected void RegisterDurableConsumer(string connectionID, string destination, string consumerID, string selector, bool noLocal)
-        {
-            using(IConnection connection = CreateConnection(connectionID))
-            {
-                connection.Start();
-                using(ISession session = connection.CreateSession(AcknowledgementMode.DupsOkAcknowledge))
-                {
-                    ITopic destinationTopic = SessionUtil.GetTopic(session, destination);
-                    Assert.IsNotNull(destinationTopic, "Could not get destination topic.");
-                    using(IMessageConsumer consumer = session.CreateDurableConsumer(destinationTopic, consumerID, selector, noLocal))
-                    {
-                        Assert.IsNotNull(consumer, "Could not create durable consumer.");
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Unregister a durable consumer for the given connection ID.
-        /// </summary>
-        /// <param name="connectionID">Connection ID of the consumer.</param>
-        /// <param name="consumerID">Name of the durable consumer.</param>
-        protected void UnregisterDurableConsumer(string connectionID, string consumerID)
-        {
-            using(IConnection connection = CreateConnection(connectionID))
-            {
-                connection.Start();
-                using(ISession session = connection.CreateSession(AcknowledgementMode.DupsOkAcknowledge))
-                {
-                    session.DeleteDurableConsumer(consumerID);
-                }
-            }
-        }
-
-        public static string ToHex(long value)
-        {
-            return String.Format("{0:x}", value);
-        }
-
-        public void SendMessages(IDestination destination, MsgDeliveryMode deliveryMode, int count)
-        {
-            IConnection connection = CreateConnection();
-            connection.Start();
-            SendMessages(connection, destination, deliveryMode, count);
-            connection.Close();
-        }
-
-        public void SendMessages(IConnection connection, IDestination destination, MsgDeliveryMode deliveryMode, int count)
-        {
-            ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
-            SendMessages(session, destination, deliveryMode, count);
-            session.Close();
-        }
-
-        public void SendMessages(ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count)
-        {
-            IMessageProducer producer = session.CreateProducer(destination);
-            producer.DeliveryMode = deliveryMode;
-            for(int i = 0; i < count; i++)
-            {
-                producer.Send(session.CreateTextMessage("" + i));
-            }
-            producer.Close();
-        }
-
-        public IDestination CreateDestination(ISession session, DestinationType type)
-        {
-            return CreateDestination(session, type, "");
-        }
-
-        public IDestination CreateDestination(ISession session, DestinationType type, string name)
-        {
-            if(name == "")
-            {
-                name = "TEST." + this.GetType().Name + "." + Guid.NewGuid();
-            }
-
-            switch(type)
-            {
-            case DestinationType.Queue:
-                return session.GetQueue(name);
-            case DestinationType.Topic:
-                return session.GetTopic(name);
-            case DestinationType.TemporaryQueue:
-                return session.CreateTemporaryQueue();
-            case DestinationType.TemporaryTopic:
-                return session.CreateTemporaryTopic();
-            default:
-                throw new ArgumentException("type: " + type);
-            }
-        }
-
-        protected void AssertTextMessagesEqual(IMessage[] firstSet, IMessage[] secondSet)
-        {
-            AssertTextMessagesEqual(firstSet, secondSet, "");
-        }
-
-        protected void AssertTextMessagesEqual(IMessage[] firstSet, IMessage[] secondSet, string messsage)
-        {
-            Assert.AreEqual(firstSet.Length, secondSet.Length, "Message count does not match: " + messsage);
-
-            for(int i = 0; i < secondSet.Length; i++)
-            {
-                ITextMessage m1 = firstSet[i] as ITextMessage;
-                ITextMessage m2 = secondSet[i] as ITextMessage;
-
-                AssertTextMessageEqual(m1, m2, "Message " + (i + 1) + " did not match : ");
-            }
-        }
-
-        protected void AssertEquals(ITextMessage m1, ITextMessage m2)
-        {
-            AssertEquals(m1, m2, "");
-        }
-
-        protected void AssertTextMessageEqual(ITextMessage m1, ITextMessage m2, string message)
-        {
-            Assert.IsFalse(m1 == null ^ m2 == null, message + ": expected {" + m1 + "}, but was {" + m2 + "}");
-
-            if(m1 == null)
-            {
-                return;
-            }
-
-            Assert.AreEqual(m1.Text, m2.Text, message);
-        }
-
-        protected void AssertEquals(IMessage m1, IMessage m2)
-        {
-            AssertEquals(m1, m2, "");
-        }
-
-        protected void AssertEquals(IMessage m1, IMessage m2, string message)
-        {
-            Assert.IsFalse(m1 == null ^ m2 == null, message + ": expected {" + m1 + "}, but was {" + m2 + "}");
-
-            if(m1 == null)
-            {
-                return;
-            }
-
-            Assert.IsTrue(m1.GetType() == m2.GetType(), message + ": expected {" + m1 + "}, but was {" + m2 + "}");
-
-            if(m1 is ITextMessage)
-            {
-                AssertTextMessageEqual((ITextMessage)m1, (ITextMessage)m2, message);
-            }
-            else
-            {
-                Assert.AreEqual(m1, m2, message);
-            }
-        }
-    }
+			if(null == varValue)
+			{
+				varValue = defaultValue;
+			}
+
+			return varValue;
+		}
+
+		public virtual string GetTestClientId()
+		{
+
+			System.Text.StringBuilder id = new System.Text.StringBuilder();
+
+			id.Append("ID:");
+			id.Append(this.GetType().Name);
+			id.Append(":");
+			id.Append(this.testRun);
+			id.Append(":");
+			id.Append(++idCounter);
+
+			return id.ToString();
+		}
+
+		/// <summary>
+		/// Create a new connection to the broker.
+		/// </summary>
+		/// <returns></returns>
+		public virtual IConnection CreateConnection()
+		{
+			return CreateConnection(null);
+		}
+
+		/// <summary>
+		/// Create a new connection to the broker.
+		/// </summary>
+		/// <param name="newClientId">Client ID of the new connection.</param>
+		/// <returns></returns>
+		public virtual IConnection CreateConnection(string newClientId)
+		{
+			IConnection newConnection = Factory.CreateConnection(userName, passWord);
+			Assert.IsNotNull(newConnection, "connection not created");
+			if(newClientId != null)
+			{
+				newConnection.ClientId = newClientId;
+			}
+
+			return newConnection;
+		}
+
+		public IDestination CreateDestination(ISession session, DestinationType type)
+		{
+			return CreateDestination(session, type, "");
+		}
+
+		public IDestination CreateDestination(ISession session, DestinationType type, string name)
+		{
+			switch(type)
+			{
+				case DestinationType.Queue:
+					if(string.IsNullOrEmpty(name))
+					{
+						name = "queue://TEST." + this.GetType().Name + "." + Guid.NewGuid().ToString();
+					}
+					break;
+
+				case DestinationType.Topic:
+					if(string.IsNullOrEmpty(name))
+					{
+						name = "topic://TEST." + this.GetType().Name + "." + Guid.NewGuid().ToString();
+					}
+					break;
+
+				case DestinationType.TemporaryQueue:
+					if(string.IsNullOrEmpty(name))
+					{
+						name = "temp-queue://TEST." + this.GetType().Name + "." + Guid.NewGuid().ToString();
+					}
+					break;
+
+				case DestinationType.TemporaryTopic:
+					if(string.IsNullOrEmpty(name))
+					{
+						name = "temp-topic://TEST." + this.GetType().Name + "." + Guid.NewGuid().ToString();
+					}
+					break;
+
+				default:
+					throw new ArgumentException("type: " + type);
+			}
+
+			return CreateDestination(session, name);
+		}
+
+		/// <summary>
+		/// Create a destination.  This will delete an existing destination and re-create it.
+		/// </summary>
+		/// <param name="session"></param>
+		/// <param name="destinationName"></param>
+		/// <returns></returns>
+		public virtual IDestination CreateDestination(ISession session, string destinationName)
+		{
+			try
+			{
+				SessionUtil.DeleteDestination(session, destinationName);
+			}
+			catch(Exception)
+			{
+				// Can't delete it, so lets try and purge it.
+				IDestination destination = SessionUtil.GetDestination(session, destinationName);
+
+				using(IMessageConsumer consumer = session.CreateConsumer(destination))
+				{
+					while(consumer.Receive(TimeSpan.FromMilliseconds(750)) != null)
+					{
+					}
+				}
+			}
+
+			return SessionUtil.GetDestination(session, destinationName);
+		}
+
+		/// <summary>
+		/// Register a durable consumer
+		/// </summary>
+		/// <param name="connectionID">Connection ID of the consumer.</param>
+		/// <param name="destination">Destination name to register.  Supports embedded prefix names.</param>
+		/// <param name="consumerID">Name of the durable consumer.</param>
+		/// <param name="selector">Selector parameters for consumer.</param>
+		/// <param name="noLocal"></param>
+		protected void RegisterDurableConsumer(string connectionID, string destination, string consumerID, string selector, bool noLocal)
+		{
+			using(IConnection connection = CreateConnection(connectionID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.DupsOkAcknowledge))
+				{
+					ITopic destinationTopic = (ITopic) SessionUtil.GetDestination(session, destination);
+					Assert.IsNotNull(destinationTopic, "Could not get destination topic.");
+					using(IMessageConsumer consumer = session.CreateDurableConsumer(destinationTopic, consumerID, selector, noLocal))
+					{
+						Assert.IsNotNull(consumer, "Could not create durable consumer.");
+					}
+				}
+			}
+		}
+
+		/// <summary>
+		/// Unregister a durable consumer for the given connection ID.
+		/// </summary>
+		/// <param name="connectionID">Connection ID of the consumer.</param>
+		/// <param name="consumerID">Name of the durable consumer.</param>
+		protected void UnregisterDurableConsumer(string connectionID, string consumerID)
+		{
+			using(IConnection connection = CreateConnection(connectionID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.DupsOkAcknowledge))
+				{
+					session.DeleteDurableConsumer(consumerID);
+				}
+			}
+		}
+
+		public static string ToHex(long value)
+		{
+			return String.Format("{0:x}", value);
+		}
+
+		public void SendMessages(IDestination destination, MsgDeliveryMode deliveryMode, int count)
+		{
+			IConnection connection = CreateConnection();
+			connection.Start();
+			SendMessages(connection, destination, deliveryMode, count);
+			connection.Close();
+		}
+
+		public void SendMessages(IConnection connection, IDestination destination, MsgDeliveryMode deliveryMode, int count)
+		{
+			ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
+			SendMessages(session, destination, deliveryMode, count);
+			session.Close();
+		}
+
+		public void SendMessages(ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count)
+		{
+			IMessageProducer producer = session.CreateProducer(destination);
+			producer.DeliveryMode = deliveryMode;
+			for(int i = 0; i < count; i++)
+			{
+				producer.Send(session.CreateTextMessage("" + i));
+			}
+			producer.Close();
+		}
+
+		protected void AssertTextMessagesEqual(IMessage[] firstSet, IMessage[] secondSet)
+		{
+			AssertTextMessagesEqual(firstSet, secondSet, "");
+		}
+
+		protected void AssertTextMessagesEqual(IMessage[] firstSet, IMessage[] secondSet, string messsage)
+		{
+			Assert.AreEqual(firstSet.Length, secondSet.Length, "Message count does not match: " + messsage);
+
+			for(int i = 0; i < secondSet.Length; i++)
+			{
+				ITextMessage m1 = firstSet[i] as ITextMessage;
+				ITextMessage m2 = secondSet[i] as ITextMessage;
+
+				AssertTextMessageEqual(m1, m2, "Message " + (i + 1) + " did not match : ");
+			}
+		}
+
+		protected void AssertEquals(ITextMessage m1, ITextMessage m2)
+		{
+			AssertEquals(m1, m2, "");
+		}
+
+		protected void AssertTextMessageEqual(ITextMessage m1, ITextMessage m2, string message)
+		{
+			Assert.IsFalse(m1 == null ^ m2 == null, message + ": expected {" + m1 + "}, but was {" + m2 + "}");
+
+			if(m1 == null)
+			{
+				return;
+			}
+
+			Assert.AreEqual(m1.Text, m2.Text, message);
+		}
+
+		protected void AssertEquals(IMessage m1, IMessage m2)
+		{
+			AssertEquals(m1, m2, "");
+		}
+
+		protected void AssertEquals(IMessage m1, IMessage m2, string message)
+		{
+			Assert.IsFalse(m1 == null ^ m2 == null, message + ": expected {" + m1 + "}, but was {" + m2 + "}");
+
+			if(m1 == null)
+			{
+				return;
+			}
+
+			Assert.IsTrue(m1.GetType() == m2.GetType(), message + ": expected {" + m1 + "}, but was {" + m2 + "}");
+
+			if(m1 is ITextMessage)
+			{
+				AssertTextMessageEqual((ITextMessage) m1, (ITextMessage) m2, message);
+			}
+			else
+			{
+				Assert.AreEqual(m1, m2, message);
+			}
+		}
+	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/RequestResponseTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/RequestResponseTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/RequestResponseTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/RequestResponseTest.cs Tue Feb 26 18:12:54 2013
@@ -26,8 +26,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class RequestResponseTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "RequestDestination";
-		
 		[Test]
 		[Category("RequestResponse")]		
 		public void TestRequestResponseMessaging()
@@ -37,7 +35,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					ITemporaryQueue replyTo = session.CreateTemporaryQueue();
 
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/StreamMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/StreamMessageTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/StreamMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/StreamMessageTest.cs Tue Feb 26 18:12:54 2013
@@ -23,8 +23,6 @@ namespace Apache.NMS.Test
     [TestFixture]    
     public class StreamMessageTest : NMSTestSupport
     {
-        protected static string DESTINATION_NAME = "StreamMessageDestination";
-
         protected bool a = true;
         protected byte b = 123;
         protected char c = 'c';
@@ -50,7 +48,7 @@ namespace Apache.NMS.Test
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                 {
-                    IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
                     using(IMessageConsumer consumer = session.CreateConsumer(destination))
                     using(IMessageProducer producer = session.CreateProducer(destination))
                     {

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs Tue Feb 26 18:12:54 2013
@@ -24,10 +24,10 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class TempDestinationTests : NMSTestSupport
 	{
-		protected const string QUEUE_DESTINATION_NAME = "queue://AutoDeleteQueue";
-		protected const string TOPIC_DESTINATION_NAME = "topic://AutoDeleteTopic";
-		protected const string TEMP_QUEUE_DESTINATION_NAME = "temp-queue://AutoDeleteTempQueue";
-		protected const string TEMP_TOPIC_DESTINATION_NAME = "temp-topic://AutoDeleteTempTopic";
+		protected const string QUEUE_DESTINATION_NAME = "queue://TEST.AutoDeleteQueue";
+		protected const string TOPIC_DESTINATION_NAME = "topic://TEST.AutoDeleteTopic";
+		protected const string TEMP_QUEUE_DESTINATION_NAME = "temp-queue://TEST.AutoDeleteTempQueue";
+		protected const string TEMP_TOPIC_DESTINATION_NAME = "temp-topic://TEST.AutoDeleteTempTopic";
 
 		[Test]
 		public void TempDestinationDeletionTest(
@@ -45,7 +45,7 @@ namespace Apache.NMS.Test
 
 					for(int index = 1; index <= MaxNumDestinations; index++)
 					{
-						IDestination destination = SessionUtil.GetDestination(session, destinationName);
+						IDestination destination = CreateDestination(session, destinationName);
 
 						using(IMessageProducer producer = session.CreateProducer(destination))
 						using(IMessageConsumer consumer = session.CreateConsumer(destination))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs Tue Feb 26 18:12:54 2013
@@ -23,8 +23,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class TextMessageTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "TextMessageDestination";
-
 		[Test]
 		public void SendReceiveTextMessage(
 			[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
@@ -35,7 +33,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs Tue Feb 26 18:12:54 2013
@@ -24,7 +24,7 @@ namespace Apache.NMS.Test
     [TestFixture]
     public class TransactionTest : NMSTestSupport
     {
-        protected static string DESTINATION_NAME = "TransactionTestDestination";
+        protected static string DESTINATION_NAME = "queue://TEST.TransactionTestDestination";
 
         [Test]
         public void TestSendRollback(
@@ -92,7 +92,7 @@ namespace Apache.NMS.Test
                             connection2.Start();
                             using(ISession session2 = connection2.CreateSession(AcknowledgementMode.Transactional))
                             {
-                                IDestination destination2 = SessionUtil.GetDestination(session2, DESTINATION_NAME);
+                                IDestination destination2 = CreateDestination(session2, DESTINATION_NAME);
                                 using(IMessageProducer producer = session2.CreateProducer(destination2))
                                 {
                                     producer.DeliveryMode = deliveryMode;
@@ -112,7 +112,7 @@ namespace Apache.NMS.Test
                             connection2.Start();
                             using(ISession session2 = connection2.CreateSession(AcknowledgementMode.Transactional))
                             {
-                                IDestination destination2 = SessionUtil.GetDestination(session2, DESTINATION_NAME);
+                                IDestination destination2 = CreateDestination(session2, DESTINATION_NAME);
                                 using(IMessageProducer producer = session2.CreateProducer(destination2))
                                 {
                                     producer.DeliveryMode = deliveryMode;
@@ -362,7 +362,7 @@ namespace Apache.NMS.Test
             {
                 connection.Start();
                 ISession session = connection.CreateSession(AcknowledgementMode.Transactional);
-                IQueue destination = session.GetQueue("TestRedispatchOfRolledbackTx:"+Guid.NewGuid());
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
 
                 SendMessages(connection, destination, deliveryMode, 2);
 
@@ -401,7 +401,7 @@ namespace Apache.NMS.Test
             {
                 connection.Start();
                 ISession session = connection.CreateSession(AcknowledgementMode.Transactional);
-                IQueue destination = session.GetQueue("TestRedispatchOfUncommittedTx:"+Guid.NewGuid());
+				IDestination destination = CreateDestination(session, DestinationType.Queue);
 
                 SendMessages(connection, destination, deliveryMode, 2);
 

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/XmlMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/XmlMessageTest.cs?rev=1450322&r1=1450321&r2=1450322&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/XmlMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/XmlMessageTest.cs Tue Feb 26 18:12:54 2013
@@ -68,8 +68,6 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class XmlMessageTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "XmlMessageDestination";
-
 #if NET_3_5 || MONO
 		[Test]
 		public void SendReceiveXmlMessage_Net35()
@@ -79,7 +77,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = session.GetDestination(DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{
@@ -134,7 +132,7 @@ namespace Apache.NMS.Test
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
 				{
-					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					IDestination destination = CreateDestination(session, DestinationType.Queue);
 					using(IMessageConsumer consumer = session.CreateConsumer(destination))
 					using(IMessageProducer producer = session.CreateProducer(destination))
 					{



Mime
View raw message