activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r834076 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands: ActiveMQMapMessageTest.cs ActiveMQMessageTest.cs
Date Mon, 09 Nov 2009 14:24:26 GMT
Author: tabish
Date: Mon Nov  9 14:24:19 2009
New Revision: 834076

URL: http://svn.apache.org/viewvc?rev=834076&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQNET-207

Apply patch.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMapMessageTest.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMessageTest.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMapMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMapMessageTest.cs?rev=834076&r1=834075&r2=834076&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMapMessageTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMapMessageTest.cs
Mon Nov  9 14:24:19 2009
@@ -20,6 +20,7 @@
 using System.Text;
 using System.Collections;
 using Apache.NMS.ActiveMQ.Commands;
+using System.Globalization;
 
 namespace Apache.NMS.ActiveMQ.Test.Commands
 {    
@@ -237,8 +238,8 @@
             Byte byteValue = Byte.Parse("1");
             byte[] bytesValue = new byte[3];
             Char charValue = (Char) 'a';
-            Double doubleValue = Double.Parse("1.5");
-            Single floatValue = Single.Parse("1.5");
+			Double doubleValue = Double.Parse("1.5", CultureInfo.InvariantCulture);
+			Single floatValue = Single.Parse("1.5", CultureInfo.InvariantCulture);
             Int32 intValue = Int32.Parse("1");
             Int64 longValue = Int64.Parse("1");
             Int16 shortValue = Int16.Parse("1");

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMessageTest.cs?rev=834076&r1=834075&r2=834076&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMessageTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Commands/ActiveMQMessageTest.cs
Mon Nov  9 14:24:19 2009
@@ -731,11 +731,12 @@
         {
             ActiveMQMessage msg = new ActiveMQMessage();
             String propertyName = "property";
-            msg.Properties.SetFloat(propertyName, (float)1.5);
-            Assert.AreEqual((float)msg.Properties[propertyName], 1.5, 0);
-            Assert.AreEqual(msg.Properties.GetFloat(propertyName), 1.5, 0);
-            Assert.AreEqual(msg.Properties.GetDouble(propertyName), 1.5, 0);
-            Assert.AreEqual(msg.Properties.GetString(propertyName), "1.5");
+			float floatValue = (float)1.5;
+			msg.Properties.SetFloat(propertyName, floatValue);
+			Assert.AreEqual((float)msg.Properties[propertyName], floatValue, 0);
+			Assert.AreEqual(msg.Properties.GetFloat(propertyName), floatValue, 0);
+			Assert.AreEqual(msg.Properties.GetDouble(propertyName), floatValue, 0);
+			Assert.AreEqual(msg.Properties.GetString(propertyName), floatValue.ToString());
             
             try
             {
@@ -788,10 +789,11 @@
         {
             ActiveMQMessage msg = new ActiveMQMessage();
             String propertyName = "property";
-            msg.Properties.SetDouble(propertyName, 1.5);
-            Assert.AreEqual((double)msg.Properties[propertyName], 1.5, 0);
-            Assert.AreEqual(msg.Properties.GetDouble(propertyName), 1.5, 0);
-            Assert.AreEqual(msg.Properties.GetString(propertyName), "1.5");
+			Double doubleValue = 1.5;
+            msg.Properties.SetDouble(propertyName, doubleValue);
+			Assert.AreEqual((double)msg.Properties[propertyName], doubleValue, 0);
+			Assert.AreEqual(msg.Properties.GetDouble(propertyName), doubleValue, 0);
+			Assert.AreEqual(msg.Properties.GetString(propertyName), doubleValue.ToString());
             
             try 
             {
@@ -865,8 +867,9 @@
             Assert.AreEqual(msg.Properties.GetShort(propertyName), 1);
             Assert.AreEqual(msg.Properties.GetInt(propertyName), 1);
             Assert.AreEqual(msg.Properties.GetLong(propertyName), 1);
-    
-            stringValue = "1.5";
+
+			Double doubleValue = 1.5;
+			stringValue = doubleValue.ToString();
             msg.Properties.SetString(propertyName, stringValue);
             Assert.AreEqual(msg.Properties.GetFloat(propertyName), 1.5, 0);
             Assert.AreEqual(msg.Properties.GetDouble(propertyName), 1.5, 0);



Mime
View raw message