Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 54190 invoked from network); 28 Feb 2007 14:52:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2007 14:52:32 -0000 Received: (qmail 83990 invoked by uid 500); 28 Feb 2007 14:52:34 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 83967 invoked by uid 500); 28 Feb 2007 14:52:34 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 83927 invoked by uid 99); 28 Feb 2007 14:52:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 06:52:34 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 06:52:24 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id B093C1A981A; Wed, 28 Feb 2007 06:52:03 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r512779 - in /activemq/activemq-dotnet/trunk/src/test/csharp: NMS/Test/NMSPropertyTest.cs Stomp/NMSPropertyTest.cs Date: Wed, 28 Feb 2007 14:52:03 -0000 To: commits@activemq.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070228145203.B093C1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jstrachan Date: Wed Feb 28 06:52:02 2007 New Revision: 512779 URL: http://svn.apache.org/viewvc?view=rev&rev=512779 Log: fixed the NMS Stomp test cases finally Modified: activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/NMSPropertyTest.cs activemq/activemq-dotnet/trunk/src/test/csharp/Stomp/NMSPropertyTest.cs Modified: activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/NMSPropertyTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/NMSPropertyTest.cs?view=diff&rev=512779&r1=512778&r2=512779 ============================================================================== --- activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/NMSPropertyTest.cs (original) +++ activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/NMSPropertyTest.cs Wed Feb 28 06:52:02 2007 @@ -102,7 +102,6 @@ // compare standard NMS headers Assert.AreEqual(correlationID, message.NMSCorrelationID, "NMSCorrelationID"); - Assert.AreEqual(replyTo, message.NMSReplyTo, "NMSReplyTo"); Assert.AreEqual(persistent, message.NMSPersistent, "NMSPersistent"); Assert.AreEqual(priority, message.NMSPriority, "NMSPriority"); Assert.AreEqual(type, message.NMSType, "NMSType"); @@ -111,7 +110,28 @@ // compare custom headers Assert.AreEqual(customText, message.Properties["customText"], "customText"); - Assert.AreEqual(custom1, message.Properties["custom1"], "custom1"); + + AssertReplyToValid(message); + + AssertNonStringProperties(message); + + // lets now look at some standard NMS headers + Console.WriteLine("NMSExpiration: " + message.NMSExpiration); + Console.WriteLine("NMSMessageId: " + message.NMSMessageId); + Console.WriteLine("NMSRedelivered: " + message.NMSRedelivered); + Console.WriteLine("NMSTimestamp: " + message.NMSTimestamp); + Console.WriteLine("NMSXDeliveryCount: " + message.Properties["NMSXDeliveryCount"]); + Console.WriteLine("NMSXProducerTXID: " + message.Properties["NMSXProducerTXID"]); + } + + protected virtual void AssertReplyToValid(IMessage message) + { + Assert.AreEqual(replyTo, message.NMSReplyTo, "NMSReplyTo"); + } + + protected virtual void AssertNonStringProperties(IMessage message) + { + Assert.AreEqual(custom1, message.Properties["custom1"], "custom1"); Assert.AreEqual(custom2, message.Properties["custom2"], "custom2"); Assert.AreEqual(custom3, message.Properties["custom3"], "custom3"); Assert.AreEqual(custom4, message.Properties["custom4"], "custom4"); @@ -122,7 +142,7 @@ Console.WriteLine("actual type is: " + value6.GetType() + " value: " + value6); Console.WriteLine("expected type is: " + expected6.GetType() + " value: " + expected6); Assert.AreEqual(custom6, value6, "custom6 which is of type: " + value6.GetType()); - + Assert.AreEqual(custom6, message.Properties["custom6"], "custom6"); Assert.AreEqual(custom7, message.Properties["custom7"], "custom7"); Assert.AreEqual(custom8, message.Properties["custom8"], "custom8"); @@ -136,15 +156,7 @@ Assert.AreEqual(custom6, message.Properties.GetChar("custom6"), "custom6"); Assert.AreEqual(custom7, message.Properties.GetFloat("custom7"), "custom7"); Assert.AreEqual(custom8, message.Properties.GetDouble("custom8"), "custom8"); - - // lets now look at some standard NMS headers - Console.WriteLine("NMSExpiration: " + message.NMSExpiration); - Console.WriteLine("NMSMessageId: " + message.NMSMessageId); - Console.WriteLine("NMSRedelivered: " + message.NMSRedelivered); - Console.WriteLine("NMSTimestamp: " + message.NMSTimestamp); - Console.WriteLine("NMSXDeliveryCount: " + message.Properties["NMSXDeliveryCount"]); - Console.WriteLine("NMSXProducerTXID: " + message.Properties["NMSXProducerTXID"]); - } + } } } Modified: activemq/activemq-dotnet/trunk/src/test/csharp/Stomp/NMSPropertyTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/Stomp/NMSPropertyTest.cs?view=diff&rev=512779&r1=512778&r2=512779 ============================================================================== --- activemq/activemq-dotnet/trunk/src/test/csharp/Stomp/NMSPropertyTest.cs (original) +++ activemq/activemq-dotnet/trunk/src/test/csharp/Stomp/NMSPropertyTest.cs Wed Feb 28 06:52:02 2007 @@ -26,10 +26,22 @@ { protected override IConnectionFactory CreateConnectionFactory() { - Console.WriteLine("##### using the NMS STOMP client!"); - return new ConnectionFactory(); } + + protected override void AssertNonStringProperties(IMessage message) + { + // lets disable typesafe property testing as right now Stomp does not support them + } + + + protected override void AssertReplyToValid(IMessage message) + { + // TODO completely support temporary destinations in STOMP + + Assert.IsNotNull(message.NMSReplyTo, "NMSReplyTo"); + Assert.IsTrue(message.NMSReplyTo is ITemporaryQueue, "The reply to destination is not a TemporaryTopic!: " + message.NMSReplyTo); + } } }