activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r507883 - /activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/OpenWire/PrimitiveMapTest.cs
Date Thu, 15 Feb 2007 10:42:07 GMT
Author: jstrachan
Date: Thu Feb 15 02:42:06 2007
New Revision: 507883

URL: http://svn.apache.org/viewvc?view=rev&rev=507883
Log:
Enhanced the test case for deeply nested maps and lists on an IMapMessage

Modified:
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/OpenWire/PrimitiveMapTest.cs

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/OpenWire/PrimitiveMapTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/OpenWire/PrimitiveMapTest.cs?view=diff&rev=507883&r1=507882&r2=507883
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/OpenWire/PrimitiveMapTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/OpenWire/PrimitiveMapTest.cs Thu
Feb 15 02:42:06 2007
@@ -116,9 +116,22 @@
 
             IList list = map.GetList("m");
             Assert.AreEqual(2, list.Count, "list size");
+			Assert.IsTrue(list.Contains("Item1"));
+			Assert.IsTrue(list.Contains("Item2"));
 
             IDictionary dictionary = map.GetDictionary("n");
-            Assert.AreEqual(3, dictionary.Count, "dictionary size");
+            Assert.AreEqual(5, dictionary.Count, "dictionary size");
+
+			IDictionary childMap = (IDictionary) dictionary["childMap"];
+			Console.WriteLine("Found childMap: " + childMap);
+			
+			Assert.IsNotNull(childMap);
+			Assert.AreEqual("childMap", childMap["name"], "childMap[name]");
+			
+			IList childList = (IList) dictionary["childList"];
+			Console.WriteLine("Found childList: " + childList);
+			Assert.IsNotNull(childList);
+			Assert.IsTrue(childList.Contains("childListElement1"));
         }
 
 
@@ -136,6 +149,14 @@
             answer.Add("Name", "James");
             answer.Add("Location", "London");
             answer.Add("Company", "LogicBlaze");
+
+			Hashtable childMap = new Hashtable();
+			childMap.Add("name", "childMap");
+			answer.Add("childMap", childMap);
+			
+			ArrayList childList = new ArrayList();
+			childList.Add("childListElement1");
+			answer.Add("childList", childList);
             return answer;
         }
 



Mime
View raw message