activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r889676 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs
Date Fri, 11 Dec 2009 16:10:14 GMT
Author: tabish
Date: Fri Dec 11 16:10:14 2009
New Revision: 889676

URL: http://svn.apache.org/viewvc?rev=889676&view=rev
Log:
Add an additional test for adding and removing an MessageListner from a Consumer.

Modified:
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs

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=889676&r1=889675&r2=889676&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 Fri Dec 11 16:10:14
2009
@@ -477,6 +477,25 @@
                 session.Close();
             }
         }
+		
+		[Test]
+		public void TestAddRemoveAsnycMessageListener()
+		{
+            using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+            {
+				connection.Start();
+				
+                ISession session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
+                ITemporaryTopic topic = session.CreateTemporaryTopic();
+                IMessageConsumer consumer = session.CreateConsumer(topic);
+
+				consumer.Listener += OnMessage;
+				consumer.Listener -= OnMessage;
+				consumer.Listener += OnMessage;
+				
+				consumer.Close();
+			}
+		}
     
         public void OnMessage(IMessage message) 
         {



Mime
View raw message