Browse Source

Add a test for UriTemplate.Match

Antonius Riha 13 years ago
parent
commit
c63b7eba2d
1 changed files with 10 additions and 0 deletions
  1. 10 0
      mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs

+ 10 - 0
mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs

@@ -411,6 +411,16 @@ namespace MonoTests.System
 			Assert.AreEqual ("vv", m.QueryParameters ["p1"], "#5");
 		}
 
+		[Test]
+		public void Match3 ()
+		{
+			var template = new UriTemplate ("test");
+			var match1 = template.Match (new Uri ("http://something"), new Uri ("http://something/test"));
+			var match2 = template.Match (new Uri ("http://something/something2"), new Uri ("http://something/something2/test"));
+			Assert.IsNotNull (match1, "#1");
+			Assert.IsNotNull (match2, "#2");
+		}
+		
 		[Test]
 		public void MatchWildcard ()
 		{