You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/07/16 16:15:59 UTC

svn commit: r964803 - in /activemq/activemq-dotnet/Apache.NMS/trunk/src: main/csharp/Util/URISupport.cs test/csharp/URISupportTest.cs

Author: tabish
Date: Fri Jul 16 14:15:59 2010
New Revision: 964803

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

Use Uri's in the test that don't break with the Uri Class in .NET

Modified:
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/URISupportTest.cs

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs?rev=964803&r1=964802&r2=964803&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs Fri Jul 16 14:15:59 2010
@@ -460,21 +460,7 @@ namespace Apache.NMS.Util
             rc.Components = new Uri[components.Length];
             for(int i = 0; i < components.Length; i++)
             {
-//                if(components.Length == 1 && components[0] == ssp)
-//                {
-//                    String[] parts = components[0].Split('?');
-//                    UriBuilder builder = new UriBuilder();
-//                    builder.Path = parts[0];
-//                    if(parts.Length == 2)
-//                    {
-//                        builder.Query = parts[1];
-//                    }
-//                    rc.Components[i] = builder.Uri;
-//                }
-//                else
-//                {
-                    rc.Components[i] = new Uri(components[i].Trim());
-//                }
+                rc.Components[i] = new Uri(components[i].Trim());
             }
 
             p = parms.IndexOf("?");

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/URISupportTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/URISupportTest.cs?rev=964803&r1=964802&r2=964803&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/URISupportTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/URISupportTest.cs Fri Jul 16 14:15:59 2010
@@ -156,14 +156,14 @@ namespace Apache.NMS.Test
 		{
 	        URISupport.CompositeData data = URISupport.ParseComposite(new Uri("test:(test:path)/path"));
 	        Assert.AreEqual("path", data.Path);
-	        data = URISupport.ParseComposite(new Uri("test:path"));
+	        data = URISupport.ParseComposite(new Uri("test:test:path"));
 	        Assert.IsNull(data.Path);
 	    }
 
 		[Test]
 	    public void TestSimpleComposite()
 		{
-	        URISupport.CompositeData data = URISupport.ParseComposite(new Uri("test:part1"));
+	        URISupport.CompositeData data = URISupport.ParseComposite(new Uri("test:tcp://part1"));
 	        Assert.AreEqual(1, data.Components.Length);
 	    }