Author: jgomes
Date: Fri Aug  8 16:41:41 2008
New Revision: 684146

URL: http://svn.apache.org/viewvc?rev=684146&view=rev
Log:
Moved TemporaryQueueTest into AsyncConsumeTest.
Removed all obsolete Test methods.
Associated VisualStudio projects with Subversion Control integration (AnkhSVN).

Removed:
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TemporaryQueueTest.cs
Modified:
    
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs
    
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-cf20.csproj
    
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-test.csproj
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.csproj
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.sln
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-cf20.csproj
    activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj
    activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs
 Fri Aug  8 16:41:41 2008
@@ -64,12 +64,7 @@
        }
 
        [TestFixture]
-       public class TemporaryQueueTest : Apache.NMS.Test.TemporaryQueueTest
-       {
-       }
-
-       [TestFixture]
-       public class TextMessage : Apache.NMS.Test.TextMessageTest
+       public class TextMessageTest : Apache.NMS.Test.TextMessageTest
        {
        }
 

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-cf20.csproj
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-cf20.csproj?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-cf20.csproj 
(original)
+++ 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-cf20.csproj 
Fri Aug  8 16:41:41 2008
@@ -25,6 +25,10 @@
     </UpgradeBackupLocation>
     <SignAssembly>true</SignAssembly>
     <AssemblyOriginatorKeyFile>activemq-dotnet.snk</AssemblyOriginatorKeyFile>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
     <DebugSymbols>true</DebugSymbols>

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-test.csproj
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-test.csproj?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-test.csproj 
(original)
+++ 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq-test.csproj 
Fri Aug  8 16:41:41 2008
@@ -18,6 +18,10 @@
     </UpgradeBackupLocation>
     <SignAssembly>true</SignAssembly>
     <AssemblyOriginatorKeyFile>activemq-dotnet.snk</AssemblyOriginatorKeyFile>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
     <DebugSymbols>true</DebugSymbols>

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.csproj
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.csproj?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.csproj 
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.csproj 
Fri Aug  8 16:41:41 2008
@@ -31,6 +31,10 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
     <DebugSymbols>true</DebugSymbols>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.sln
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.sln?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.sln 
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2008-activemq.sln Fri 
Aug  8 16:41:41 2008
@@ -14,6 +14,10 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2008-nms-cf20", 
"vendor\Apache.NMS\vs2008-nms-cf20.csproj", 
"{9C67B162-803E-4765-8A1C-041871E6928C}"
 EndProject
 Global
+       GlobalSection(SubversionScc) = preSolution
+               Svn-Managed = True
+               Manager = AnkhSVN - Subversion Support for Visual Studio
+       EndGlobalSection
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
                Release|Any CPU = Release|Any CPU

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=684146&r1=684145&r2=684146&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 
Fri Aug  8 16:41:41 2008
@@ -26,6 +26,7 @@
        {
                protected static string DESTINATION_NAME = 
"AsyncConsumeDestination";
                protected static string TEST_CLIENT_ID = "AsyncConsumeClientId";
+               protected static string RESPONSE_CLIENT_ID = 
"AsyncConsumeResponseClientId";
                protected object semaphore = new object();
                protected bool received;
                protected IMessage receivedMsg;
@@ -38,6 +39,13 @@
                        receivedMsg = null;
                }
 
+               [TearDown]
+               public override void TearDown()
+               {
+                       receivedMsg = null;
+                       base.TearDown();
+               }
+
                [Test]
                public void TestAsynchronousConsume()
                {
@@ -204,6 +212,72 @@
                        }
                }
 
+               [Test]
+               public void TestTemporaryQueueAsynchronousConsume()
+               {
+                       doTestTemporaryQueueAsynchronousConsume(false);
+               }
+
+               [Test]
+               public void TestTemporaryQueueAsynchronousConsumePersistent()
+               {
+                       doTestTemporaryQueueAsynchronousConsume(true);
+               }
+
+               protected void doTestTemporaryQueueAsynchronousConsume(bool 
persistent)
+               {
+                       using(IConnection connection = 
CreateConnection(TEST_CLIENT_ID))
+                       {
+                               connection.Start();
+                               using(ISession session = 
connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+                               {
+                                       IDestination destination = 
SessionUtil.GetDestination(session, DESTINATION_NAME);
+                                       ITemporaryQueue tempReplyDestination = 
session.CreateTemporaryQueue();
+
+                                       using(IMessageConsumer consumer = 
session.CreateConsumer(destination, receiveTimeout))
+                                       using(IMessageConsumer tempConsumer = 
session.CreateConsumer(tempReplyDestination, receiveTimeout))
+                                       using(IMessageProducer producer = 
session.CreateProducer(destination, receiveTimeout))
+                                       {
+                                               producer.Persistent = 
persistent;
+                                               producer.RequestTimeout = 
receiveTimeout;
+                                               tempConsumer.Listener += new 
MessageListener(OnMessage);
+                                               consumer.Listener += new 
MessageListener(OnQueueMessage);
+
+                                               IMessage request = 
session.CreateMessage();
+                                               request.NMSCorrelationID = 
"TemqQueueAsyncConsume";
+                                               request.NMSType = "Test";
+                                               request.NMSReplyTo = 
tempReplyDestination;
+                                               producer.Send(request);
+
+                                               WaitForMessageToArrive();
+                                               
Assert.AreEqual("TempQueueAsyncResponse", receivedMsg.NMSCorrelationID, 
"Invalid correlation ID.");
+                                       }
+                               }
+                       }
+               }
+
+               protected void OnQueueMessage(IMessage message)
+               {
+                       Assert.AreEqual("TemqQueueAsyncConsume", 
message.NMSCorrelationID, "Invalid correlation ID.");
+                       using(IConnection connection = 
CreateConnection(RESPONSE_CLIENT_ID))
+                       {
+                               connection.Start();
+                               using(ISession session = 
connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+                               {
+                                       using(IMessageProducer producer = 
session.CreateProducer(message.NMSReplyTo, receiveTimeout))
+                                       {
+                                               producer.Persistent = 
message.NMSPersistent;
+                                               producer.RequestTimeout = 
receiveTimeout;
+
+                                               ITextMessage response = 
session.CreateTextMessage("Asynchronous Response Message Text");
+                                               response.NMSCorrelationID = 
"TempQueueAsyncResponse";
+                                               response.NMSType = 
message.NMSType;
+                                               producer.Send(response); 
+                                       }
+                               }
+                       }
+               }
+
                protected void OnMessage(IMessage message)
                {
                        lock(semaphore)

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=684146&r1=684145&r2=684146&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 
Fri Aug  8 16:41:41 2008
@@ -14,121 +14,116 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-using Apache.NMS;
-using NUnit.Framework;
-using System;
-
 
+using System;
+using NUnit.Framework;
+using Apache.NMS.Util;
 
 namespace Apache.NMS.Test
 {
-       [ TestFixture ]
-    abstract public class MapMessageTest : NMSTestSupport
-    {
-        bool a = true;
-        byte b = 123;
-        char c = 'c';
-        short d = 0x1234;
-        int e = 0x12345678;
-        long f = 0x1234567812345678;
-        string g = "Hello World!";
-               bool h = false;
-        byte i = 0xFF;
-        short j = -0x1234;
-        int k = -0x12345678;
-        long l = -0x1234567812345678;
-               float m = 2.1F;
-               double n = 2.3;
-        
-               [SetUp]
-        override public void SetUp()
-        {
-                       base.SetUp();
-        }
-               
-        [TearDown]
-        override public void TearDown()
-        {
-                       base.TearDown();
-        }
-               
-        [ Test ]
-        public override void SendAndSyncReceive()
-        {
-            base.SendAndSyncReceive();
-        }
-               
-        protected override IMessage CreateMessage()
-        {
-            IMapMessage message = Session.CreateMapMessage();
-            
-            message.Body["a"] = a;
-            message.Body["b"] = b;
-            message.Body["c"] = c;
-            message.Body["d"] = d;
-            message.Body["e"] = e;
-            message.Body["f"] = f;
-            message.Body["g"] = g;
-            message.Body["h"] = h;
-            message.Body["i"] = i;
-            message.Body["j"] = j;
-            message.Body["k"] = k;
-            message.Body["l"] = l;
-            message.Body["m"] = m;
-            message.Body["n"] = n;
-            
-            return message;
-        }
-        
-        protected override void AssertValidMessage(IMessage message)
-        {
-            Assert.IsTrue(message is IMapMessage, "Did not receive a 
MapMessage!");
-            IMapMessage mapMessage = (IMapMessage) message;
-            
-            Console.WriteLine("Received MapMessage: " + message);
-            Console.WriteLine("Received Count: " + mapMessage.Body.Count);
-                       
-            Assert.AreEqual(ToHex(f), ToHex(mapMessage.Body.GetLong("f")), 
"map entry: f as hex");
-            
-            // use generic API to access entries
-            Assert.AreEqual(a, mapMessage.Body["a"], "generic map entry: a");
-            Assert.AreEqual(b, mapMessage.Body["b"], "generic map entry: b");
-            Assert.AreEqual(c, mapMessage.Body["c"], "generic map entry: c");
-            Assert.AreEqual(d, mapMessage.Body["d"], "generic map entry: d");
-            Assert.AreEqual(e, mapMessage.Body["e"], "generic map entry: e");
-            Assert.AreEqual(f, mapMessage.Body["f"], "generic map entry: f");
-            Assert.AreEqual(g, mapMessage.Body["g"], "generic map entry: g");
-            Assert.AreEqual(h, mapMessage.Body["h"], "generic map entry: h");
-            Assert.AreEqual(i, mapMessage.Body["i"], "generic map entry: i");
-            Assert.AreEqual(j, mapMessage.Body["j"], "generic map entry: j");
-            Assert.AreEqual(k, mapMessage.Body["k"], "generic map entry: k");
-            Assert.AreEqual(l, mapMessage.Body["l"], "generic map entry: l");
-            Assert.AreEqual(m, mapMessage.Body["m"], "generic map entry: m");
-            Assert.AreEqual(n, mapMessage.Body["n"], "generic map entry: n");
-                       
-            // use type safe APIs
-            Assert.AreEqual(a, mapMessage.Body.GetBool("a"), "map entry: a");
-            Assert.AreEqual(b, mapMessage.Body.GetByte("b"), "map entry: b");
-            Assert.AreEqual(c, mapMessage.Body.GetChar("c"), "map entry: c");
-            Assert.AreEqual(d, mapMessage.Body.GetShort("d"), "map entry: d");
-            Assert.AreEqual(e, mapMessage.Body.GetInt("e"), "map entry: e");
-            Assert.AreEqual(f, mapMessage.Body.GetLong("f"), "map entry: f");
-            Assert.AreEqual(g, mapMessage.Body.GetString("g"), "map entry: g");
-            Assert.AreEqual(h, mapMessage.Body.GetBool("h"), "map entry: h");
-            Assert.AreEqual(i, mapMessage.Body.GetByte("i"), "map entry: i");
-            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");
-            Assert.AreEqual(m, mapMessage.Body.GetFloat("m"), "map entry: m");
-            Assert.AreEqual(n, mapMessage.Body.GetDouble("n"), "map entry: n");
-                       
-        }
-        
-        protected string ToHex(long value)
-        {
-            return String.Format("{0:x}", value);
-        }
-    }
-}
+       [TestFixture]
+       abstract public class MapMessageTest : NMSTestSupport
+       {
+               protected static string DESTINATION_NAME = 
"MessagePropsDestination";
+               protected static string TEST_CLIENT_ID = "MessagePropsClientId";
 
+               protected bool          a = true;
+               protected byte          b = 123;
+               protected char          c = 'c';
+               protected short         d = 0x1234;
+               protected int           e = 0x12345678;
+               protected long          f = 0x1234567812345678;
+               protected string        g = "Hello World!";
+               protected bool          h = false;
+               protected byte          i = 0xFF;
+               protected short         j = -0x1234;
+               protected int           k = -0x12345678;
+               protected long          l = -0x1234567812345678;
+               protected float         m = 2.1F;
+               protected double        n = 2.3;
 
+               [Test]
+               public void SendReceiveMapMessage()
+               {
+                       doSendReceiveMapMessage(false);
+               }
+
+               [Test]
+               public void SendReceiveMapMessagePersistent()
+               {
+                       doSendReceiveMapMessage(true);
+               }
+
+               protected void doSendReceiveMapMessage(bool persistent)
+               {
+                       using(IConnection connection = 
CreateConnection(TEST_CLIENT_ID))
+                       {
+                               connection.Start();
+                               using(ISession session = 
connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+                               {
+                                       IDestination destination = 
SessionUtil.GetDestination(session, DESTINATION_NAME);
+                                       using(IMessageConsumer consumer = 
session.CreateConsumer(destination, receiveTimeout))
+                                       using(IMessageProducer producer = 
session.CreateProducer(destination, receiveTimeout))
+                                       {
+                                               producer.Persistent = 
persistent;
+                                               producer.RequestTimeout = 
receiveTimeout;
+                                               IMapMessage request = 
session.CreateMapMessage();
+                                               request.Body["a"] = a;
+                                               request.Body["b"] = b;
+                                               request.Body["c"] = c;
+                                               request.Body["d"] = d;
+                                               request.Body["e"] = e;
+                                               request.Body["f"] = f;
+                                               request.Body["g"] = g;
+                                               request.Body["h"] = h;
+                                               request.Body["i"] = i;
+                                               request.Body["j"] = j;
+                                               request.Body["k"] = k;
+                                               request.Body["l"] = l;
+                                               request.Body["m"] = m;
+                                               request.Body["n"] = n;
+                                               producer.Send(request);
+
+                                               IMapMessage message = 
consumer.Receive(receiveTimeout) as IMapMessage;
+                                               Assert.IsNotNull(message, "No 
message returned!");
+                                               
Assert.AreEqual(request.Properties.Count, message.Body.Count, "Invalid number 
of message maps.");
+                                               Assert.AreEqual(persistent, 
message.NMSPersistent, "NMSPersistent does not match");
+                                               Assert.AreEqual(ToHex(f), 
ToHex(message.Body.GetLong("f")), "map entry: f as hex");
+
+                                               // use generic API to access 
entries
+                                               Assert.AreEqual(a, 
message.Body["a"], "generic map entry: a");
+                                               Assert.AreEqual(b, 
message.Body["b"], "generic map entry: b");
+                                               Assert.AreEqual(c, 
message.Body["c"], "generic map entry: c");
+                                               Assert.AreEqual(d, 
message.Body["d"], "generic map entry: d");
+                                               Assert.AreEqual(e, 
message.Body["e"], "generic map entry: e");
+                                               Assert.AreEqual(f, 
message.Body["f"], "generic map entry: f");
+                                               Assert.AreEqual(g, 
message.Body["g"], "generic map entry: g");
+                                               Assert.AreEqual(h, 
message.Body["h"], "generic map entry: h");
+                                               Assert.AreEqual(i, 
message.Body["i"], "generic map entry: i");
+                                               Assert.AreEqual(j, 
message.Body["j"], "generic map entry: j");
+                                               Assert.AreEqual(k, 
message.Body["k"], "generic map entry: k");
+                                               Assert.AreEqual(l, 
message.Body["l"], "generic map entry: l");
+                                               Assert.AreEqual(m, 
message.Body["m"], "generic map entry: m");
+                                               Assert.AreEqual(n, 
message.Body["n"], "generic map entry: n");
+
+                                               // use type safe APIs
+                                               Assert.AreEqual(a, 
message.Body.GetBool("a"),   "map entry: a");
+                                               Assert.AreEqual(b, 
message.Body.GetByte("b"),   "map entry: b");
+                                               Assert.AreEqual(c, 
message.Body.GetChar("c"),   "map entry: c");
+                                               Assert.AreEqual(d, 
message.Body.GetShort("d"),  "map entry: d");
+                                               Assert.AreEqual(e, 
message.Body.GetInt("e"),    "map entry: e");
+                                               Assert.AreEqual(f, 
message.Body.GetLong("f"),   "map entry: f");
+                                               Assert.AreEqual(g, 
message.Body.GetString("g"), "map entry: g");
+                                               Assert.AreEqual(h, 
message.Body.GetBool("h"),   "map entry: h");
+                                               Assert.AreEqual(i, 
message.Body.GetByte("i"),   "map entry: i");
+                                               Assert.AreEqual(j, 
message.Body.GetShort("j"),  "map entry: j");
+                                               Assert.AreEqual(k, 
message.Body.GetInt("k"),    "map entry: k");
+                                               Assert.AreEqual(l, 
message.Body.GetLong("l"),   "map entry: l");
+                                               Assert.AreEqual(m, 
message.Body.GetFloat("m"),  "map entry: m");
+                                               Assert.AreEqual(n, 
message.Body.GetDouble("n"), "map entry: n");
+                                       }
+                               }
+                       }
+               }
+       }
+}

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=684146&r1=684145&r2=684146&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 
Fri Aug  8 16:41:41 2008
@@ -39,6 +39,8 @@
                protected short         j = -0x1234;
                protected int           k = -0x12345678;
                protected long          l = -0x1234567812345678;
+               protected float         m = 2.1F;
+               protected double        n = 2.3;
 
                [Test]
                public void SendReceiveMessageProperties()
@@ -78,11 +80,13 @@
                                                request.Properties["j"] = j;
                                                request.Properties["k"] = k;
                                                request.Properties["l"] = l;
+                                               request.Properties["m"] = m;
+                                               request.Properties["n"] = n;
                                                producer.Send(request);
 
                                                IMessage message = 
consumer.Receive(receiveTimeout);
                                                Assert.IsNotNull(message, "No 
message returned!");
-                                               Assert.AreEqual(12, 
message.Properties.Count, "Invalid number of properties.");
+                                               
Assert.AreEqual(request.Properties.Count, message.Properties.Count, "Invalid 
number of properties.");
                                                Assert.AreEqual(persistent, 
message.NMSPersistent, "NMSPersistent does not match");
                                                Assert.AreEqual(ToHex(f), 
ToHex(message.Properties.GetLong("f")), "map entry: f as hex");
 
@@ -99,6 +103,8 @@
                                                Assert.AreEqual(j, 
message.Properties["j"], "generic map entry: j");
                                                Assert.AreEqual(k, 
message.Properties["k"], "generic map entry: k");
                                                Assert.AreEqual(l, 
message.Properties["l"], "generic map entry: l");
+                                               Assert.AreEqual(m, 
message.Properties["m"], "generic map entry: m");
+                                               Assert.AreEqual(n, 
message.Properties["n"], "generic map entry: n");
 
                                                // use type safe APIs
                                                Assert.AreEqual(a, 
message.Properties.GetBool("a"),   "map entry: a");
@@ -113,15 +119,12 @@
                                                Assert.AreEqual(j, 
message.Properties.GetShort("j"),  "map entry: j");
                                                Assert.AreEqual(k, 
message.Properties.GetInt("k"),    "map entry: k");
                                                Assert.AreEqual(l, 
message.Properties.GetLong("l"),   "map entry: l");
+                                               Assert.AreEqual(m, 
message.Properties.GetFloat("m"),  "map entry: m");
+                                               Assert.AreEqual(n, 
message.Properties.GetDouble("n"), "map entry: n");
                                        }
                                }
                        }
                }
-
-               protected static string ToHex(long value)
-               {
-                       return String.Format("{0:x}", value);
-               }
        }
 }
 

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=684146&r1=684145&r2=684146&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 
Fri Aug  8 16:41:41 2008
@@ -30,29 +30,11 @@
        [TestFixture]
        public abstract class NMSTestSupport
        {
-               [Obsolete]
-               protected static object destinationLock = new object();
-               [Obsolete]
-               protected static int destinationCounter;
-
                private NMSConnectionFactory NMSFactory;
-               [Obsolete]
-               private IConnection connection;
-               [Obsolete]
-               private ISession session;
-               [Obsolete]
-               private IDestination destination;
-
                protected TimeSpan receiveTimeout = 
TimeSpan.FromMilliseconds(5000);
                protected string clientId;
                protected string passWord;
                protected string userName;
-               [Obsolete]
-               protected bool persistent = true;
-               [Obsolete]
-               protected DestinationType destinationType = 
DestinationType.Queue;
-               [Obsolete]
-               protected AcknowledgementMode acknowledgementMode = 
AcknowledgementMode.ClientAcknowledge;
 
                public NMSTestSupport()
                {
@@ -67,29 +49,9 @@
                [TearDown]
                public virtual void TearDown()
                {
-                       Disconnect();
                }
 
                // Properties
-               [Obsolete]
-               public bool Connected
-               {
-                       get { return connection != null; }
-                       set
-                       {
-                               if(value)
-                               {
-                                       if(connection == null)
-                                       {
-                                               Connect();
-                                       }
-                               }
-                               else
-                               {
-                                       Disconnect();
-                               }
-                       }
-               }
 
                /// <summary>
                /// The connection factory interface property.
@@ -107,97 +69,6 @@
                        }
                }
 
-               [Obsolete]
-               public IConnection Connection
-               {
-                       get
-                       {
-                               if(null == connection)
-                               {
-                                       Connect();
-                               }
-
-                               return connection;
-                       }
-               }
-
-               [Obsolete]
-               public ISession Session
-               {
-                       get
-                       {
-                               if(null == session)
-                               {
-                                       session = 
Connection.CreateSession(acknowledgementMode);
-                                       Assert.IsNotNull(session, "no session 
created");
-                               }
-
-                               return session;
-                       }
-               }
-
-               [Obsolete]
-               protected virtual void Connect()
-               {
-                       Console.WriteLine("Connecting...");
-                       connection = CreateConnection(this.clientId);
-                       Assert.IsNotNull(connection, "no connection created");
-                       connection.Start();
-                       Console.WriteLine("Connected.");
-               }
-
-               [Obsolete]
-               protected virtual void Disconnect()
-               {
-                       destination = null;
-                       if(session != null)
-                       {
-                               session.Dispose();
-                               session = null;
-                       }
-
-                       if(connection != null)
-                       {
-                               Console.WriteLine("Disconnecting...");
-                               connection.Dispose();
-                               connection = null;
-                               Console.WriteLine("Disconnected.");
-                       }
-               }
-
-               [Obsolete]
-               protected virtual void Drain()
-               {
-                       using(ISession drainSession = 
Connection.CreateSession())
-                       {
-                               // Tries to consume any messages on the 
Destination
-                               IMessageConsumer consumer = 
drainSession.CreateConsumer(CreateDestination(drainSession));
-
-                               // Should only need to wait for first message 
to arrive due to the way
-                               // prefetching works.
-                               while(consumer.Receive(receiveTimeout) != null)
-                               {
-                               }
-                       }
-               }
-
-               [Obsolete]
-               public virtual void SendAndSyncReceive()
-               {
-                       // IDestination sendDestination = 
CreateDestination(Session);
-                       IMessageConsumer consumer = 
Session.CreateConsumer(Destination);
-                       IMessageProducer producer = 
Session.CreateProducer(Destination);
-
-                       producer.Persistent = persistent;
-
-                       IMessage request = CreateMessage();
-                       producer.Send(request);
-
-                       IMessage message = consumer.Receive(receiveTimeout);
-                       Assert.IsNotNull(message, "No message returned!");
-                       AssertValidMessage(message);
-               }
-
                /// <summary>
                /// Name of the connection configuration filename.
                /// </summary>
@@ -380,91 +251,9 @@
                        }
                }
 
-               [Obsolete]
-               protected virtual IMessageProducer CreateProducer()
-               {
-                       return Session.CreateProducer(Destination);
-               }
-
-               [Obsolete]
-               protected virtual IMessageConsumer CreateConsumer()
-               {
-                       return Session.CreateConsumer(Destination);
-               }
-
-               [Obsolete]
-               protected virtual IDestination CreateDestination()
-               {
-                       return CreateDestination(Session);
-               }
-
-               [Obsolete]
-               protected virtual IDestination CreateDestination(ISession 
curSession)
-               {
-                       if(destinationType == DestinationType.Queue)
-                       {
-                               return 
curSession.GetQueue(CreateDestinationName());
-                       }
-                       else if(destinationType == DestinationType.Topic)
-                       {
-                               return 
curSession.GetTopic(CreateDestinationName());
-                       }
-                       else if(destinationType == 
DestinationType.TemporaryQueue)
-                       {
-                               return curSession.CreateTemporaryQueue();
-                       }
-                       else if(destinationType == 
DestinationType.TemporaryTopic)
-                       {
-                               return curSession.CreateTemporaryTopic();
-                       }
-                       else
-                       {
-                               throw new Exception("Unknown destination type: 
" + destinationType);
-                       }
-               }
-
-               [Obsolete]
-               protected virtual string CreateDestinationName()
-               {
-                       return "Test.DotNet." + GetType().Name + "." + 
NextNumber.ToString();
-               }
-
-               public static int NextNumber
-               {
-                       get
-                       {
-                               lock(destinationLock)
-                               {
-                                       return ++destinationCounter;
-                               }
-                       }
-               }
-
-               [Obsolete]
-               protected virtual IMessage CreateMessage()
-               {
-                       return Session.CreateMessage();
-               }
-
-               protected virtual void AssertValidMessage(IMessage message)
-               {
-                       Assert.IsNotNull(message, "Null Message!");
-               }
-
-               [Obsolete]
-               public IDestination Destination
+               public static string ToHex(long value)
                {
-                       get
-                       {
-                               if(destination == null)
-                               {
-                                       destination = CreateDestination();
-                                       Assert.IsNotNull(destination, "No 
destination available!");
-                                       Console.WriteLine("Using destination: " 
+ destination);
-                               }
-                               return destination;
-                       }
-                       set { destination = value; }
+                       return String.Format("{0:x}", value);
                }
        }
 }

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-cf20.csproj
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-cf20.csproj?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-cf20.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-cf20.csproj Fri Aug  8 
16:41:41 2008
@@ -25,6 +25,10 @@
     </UpgradeBackupLocation>
     <SignAssembly>true</SignAssembly>
     <AssemblyOriginatorKeyFile>activemq-dotnet.snk</AssemblyOriginatorKeyFile>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
     <DebugSymbols>true</DebugSymbols>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj Fri Aug  8 
16:41:41 2008
@@ -33,6 +33,10 @@
     <BootstrapperEnabled>true</BootstrapperEnabled>
     <SignAssembly>true</SignAssembly>
     <AssemblyOriginatorKeyFile>activemq-dotnet.snk</AssemblyOriginatorKeyFile>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
     <DebugSymbols>true</DebugSymbols>
@@ -81,9 +85,6 @@
     <Compile Include="src\test\csharp\MessageTest.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="src\test\csharp\TemporaryQueueTest.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Include="src\test\csharp\TextMessage.cs">
       <SubType>Code</SubType>
     </Compile>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj?rev=684146&r1=684145&r2=684146&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj Fri Aug  8 
16:41:41 2008
@@ -18,6 +18,10 @@
     <OldToolsVersion>2.0</OldToolsVersion>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
     <DebugSymbols>true</DebugSymbols>


Reply via email to